/**
 * Styles for the Marker Popup template catalog (see
 * includes/class-easy-map-popup-templates.php and its client-side mirror
 * src/admin/utils/popupTemplates.js). Loaded on both wp-admin (template
 * gallery + live preview on the Settings/Location screens) and the public
 * front end (actual Leaflet popups), so every class defined here must work
 * in both contexts.
 *
 * Block: .easy-map-popup
 * Modifiers (one per catalog slug except wp_editor, whose body is raw
 * admin-authored HTML with no fixed wrapper class): .easy-map-popup--default,
 * --template-2, --udine, --template-1, --template-3, --template-4, --parma,
 * --aare, --acerra, --fano. Each template's elements are styled only within
 * its own modifier scope (templates differ enough in design that sharing
 * unscoped element rules would require constant overriding).
 *
 * The image (`{marker_image}`), button (`{marker_directions_button}`,
 * `{marker_more_info_button}`) and social pill (`{marker_facebook}` etc.)
 * fragments are generated once by shared PHP/JS code and look identical in
 * every template, so those get plain, unscoped rules below.
 *
 * The button/social-pill `color`/`text-decoration` are `!important`: real
 * Leaflet popups (both this admin map preview and the live front end) load
 * Leaflet's own CSS, whose `.leaflet-container a { color: #0078A8; }` rule
 * out-specifies a plain `.easy-map-popup__btn` class selector and otherwise
 * washes these pills' text out to Leaflet's link-blue. Same reasoning as the
 * existing `.easy-map-directions-btn` rule in public/css/easy-map-public.css.
 */

/* =========================================================
   Shared fragments (image, buttons, social pills)
   ========================================================= */

.easy-map-popup__image {
	width: 100%;
	max-height: 150px;
	display: block;
	border-radius: 4px;
	object-fit: cover;
}

.easy-map-popup__btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 11px;
	background: #1a73e8;
	color: #fff !important;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none !important;
	line-height: 1.4;
}

.easy-map-popup__social-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none !important;
}

.easy-map-popup__social-link--facebook {
	background: #e7f0ff;
	color: #1877f2 !important;
}

.easy-map-popup__social-link--instagram {
	background: #fce4ec;
	color: #c13584 !important;
}

.easy-map-popup__social-link--website {
	background: #e8f5e9;
	color: #2e7d32 !important;
}

/* Base/fallback actions-row layout for wp_editor's raw admin-authored HTML,
   which has no fixed wrapper class to key a `.easy-map-popup--X +` sibling
   selector off of (see the scoped `+ .easy-map-popup__actions` rule in each
   other template's own section below, each of which — being more specific —
   still wins there over this bare-class rule). */
.easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Default
   ========================================================= */

.easy-map-popup--default {
	min-width: 220px;
}

.easy-map-popup--default .easy-map-popup__title {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
	color: #222;
}

.easy-map-popup--default .easy-map-popup__category {
	font-size: 11px;
	font-weight: 600;
	color: #1a73e8;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.easy-map-popup--default .easy-map-popup__message {
	font-size: 12px;
	color: #555;
	margin: 6px 0;
}

.easy-map-popup--default .easy-map-popup__address {
	font-size: 11px;
	color: #777;
}

/* render()/renderPopupTemplate() append the actions row AFTER the whole
   template markup (so it can't be deleted by editing a template's HTML),
   making it an adjacent sibling of the .easy-map-popup--* wrapper rather
   than a nested descendant — hence the `+` combinator on all of these. */
.easy-map-popup--default + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Minimal (template_2)
   ========================================================= */

.easy-map-popup--template-2 {
	min-width: 200px;
	padding: 4px 0;
}

.easy-map-popup--template-2 .easy-map-popup__title {
	display: block;
	font-size: 15px;
	margin-bottom: 8px;
	color: #222;
}

.easy-map-popup--template-2 .easy-map-popup__phone {
	font-size: 13px;
	color: #333;
	margin-bottom: 10px;
}

.easy-map-popup--template-2 .easy-map-popup__message {
	font-size: 12px;
	color: #555;
	margin: 0 0 10px;
}

/* render()/renderPopupTemplate() append the actions row AFTER the whole
   template markup (so it can't be deleted by editing a template's HTML),
   making it an adjacent sibling of the .easy-map-popup--* wrapper rather
   than a nested descendant — hence the `+` combinator on all 4 of these. */
.easy-map-popup--template-2 + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Udine
   ========================================================= */

.easy-map-popup--udine {
	min-width: 240px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.easy-map-popup--udine .easy-map-popup__image-wrap {
	flex: 0 0 72px;
}

.easy-map-popup--udine .easy-map-popup__body {
	flex: 1;
}

.easy-map-popup--udine .easy-map-popup__title {
	display: block;
	font-size: 14px;
	color: #222;
}

.easy-map-popup--udine .easy-map-popup__category {
	font-size: 11px;
	color: #888;
	font-style: italic;
	margin: 2px 0;
}

.easy-map-popup--udine .easy-map-popup__message {
	font-size: 12px;
	color: #555;
}

.easy-map-popup--udine + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Classic Contact (template_1)
   ========================================================= */

.easy-map-popup--template-1 {
	min-width: 260px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.easy-map-popup--template-1 .easy-map-popup__image-wrap {
	flex: 0 0 100px;
}

.easy-map-popup--template-1 .easy-map-popup__body {
	flex: 1;
	line-height: 1.4;
}

.easy-map-popup--template-1 .easy-map-popup__title {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
	color: #222;
}

.easy-map-popup--template-1 .easy-map-popup__address {
	font-size: 12px;
	color: #555;
}

.easy-map-popup--template-1 .easy-map-popup__hours {
	font-size: 11px;
	margin-top: 5px;
	color: #333;
}

.easy-map-popup--template-1 .easy-map-popup__closing-day {
	font-size: 11px;
	color: #333;
}

.easy-map-popup--template-1 .easy-map-popup__phone {
	font-size: 11px;
	margin-top: 5px;
	color: #000;
}

.easy-map-popup--template-1 .easy-map-popup__email {
	font-size: 11px;
	color: #000;
}

.easy-map-popup--template-1 + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Hours & Info (template_3)
   ========================================================= */

.easy-map-popup--template-3 {
	min-width: 240px;
	padding: 4px 0;
}

.easy-map-popup--template-3 .easy-map-popup__title {
	display: block;
	font-size: 15px;
	margin-bottom: 8px;
	color: #222;
}

.easy-map-popup--template-3 .easy-map-popup__table {
	width: 100%;
	font-size: 12px;
	border-collapse: collapse;
}

.easy-map-popup--template-3 .easy-map-popup__table-row--alt {
	background: #f9f9f9;
}

.easy-map-popup--template-3 .easy-map-popup__table-label {
	padding: 3px 12px 3px 0;
	font-weight: 600;
	color: #555;
	white-space: nowrap;
}

.easy-map-popup--template-3 .easy-map-popup__table-value {
	color: #333;
}

.easy-map-popup--template-3 + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Social Media (template_4)
   ========================================================= */

.easy-map-popup--template-4 {
	min-width: 260px;
}

.easy-map-popup--template-4 .easy-map-popup__body {
	padding: 10px;
	line-height: 1.5;
}

.easy-map-popup--template-4 .easy-map-popup__title {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
	color: #222;
}

.easy-map-popup--template-4 .easy-map-popup__address {
	font-size: 12px;
	color: #555;
}

.easy-map-popup--template-4 .easy-map-popup__phone {
	font-size: 11px;
	margin-top: 6px;
	color: #000;
}

.easy-map-popup--template-4 .easy-map-popup__email {
	font-size: 11px;
	color: #000;
}

.easy-map-popup--template-4 .easy-map-popup__social {
	margin-top: 10px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.easy-map-popup--template-4 + .easy-map-popup__actions {
	margin-top: 10px;
	padding: 0 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Parma
   ========================================================= */

.easy-map-popup--parma {
	min-width: 260px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
}

.easy-map-popup--parma .easy-map-popup__header {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.easy-map-popup--parma .easy-map-popup__title {
	font-size: 14px;
	color: #222;
}

.easy-map-popup--parma .easy-map-popup__badge {
	font-size: 10px;
	background: #222;
	color: #fff;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
}

.easy-map-popup--parma .easy-map-popup__body {
	padding: 10px 12px;
}

.easy-map-popup--parma .easy-map-popup__message {
	font-size: 12px;
	color: #555;
	margin: 8px 0;
}

.easy-map-popup--parma .easy-map-popup__address {
	font-size: 11px;
	color: #777;
}

.easy-map-popup--parma + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Aare
   ========================================================= */

.easy-map-popup--aare {
	min-width: 220px;
	display: flex;
	gap: 10px;
	align-items: center;
}

.easy-map-popup--aare .easy-map-popup__image-wrap {
	flex: 0 0 60px;
}

.easy-map-popup--aare .easy-map-popup__title {
	display: block;
	font-size: 13px;
	color: #222;
}

.easy-map-popup--aare .easy-map-popup__category {
	font-size: 11px;
	color: #888;
}

.easy-map-popup--aare + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Acerra
   ========================================================= */

.easy-map-popup--acerra {
	min-width: 250px;
}

.easy-map-popup--acerra .easy-map-popup__header {
	background: #1a73e8;
	color: #fff;
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 700;
}

.easy-map-popup--acerra .easy-map-popup__body {
	padding: 10px 12px;
}

.easy-map-popup--acerra .easy-map-popup__category {
	font-size: 11px;
	color: #1a73e8;
	font-weight: 600;
	margin: 6px 0 2px;
}

.easy-map-popup--acerra .easy-map-popup__message {
	font-size: 12px;
	color: #555;
	margin-bottom: 6px;
}

.easy-map-popup--acerra .easy-map-popup__address {
	font-size: 11px;
	color: #777;
}

.easy-map-popup--acerra + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

/* =========================================================
   Fano
   ========================================================= */

.easy-map-popup--fano {
	min-width: 260px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	flex-direction: row-reverse;
}

.easy-map-popup--fano .easy-map-popup__image-wrap {
	flex: 0 0 90px;
}

.easy-map-popup--fano .easy-map-popup__body {
	flex: 1;
}

.easy-map-popup--fano .easy-map-popup__title {
	display: block;
	font-size: 14px;
	color: #222;
	margin-bottom: 2px;
}

.easy-map-popup--fano .easy-map-popup__category {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #999;
	margin-bottom: 6px;
}

.easy-map-popup--fano .easy-map-popup__message {
	font-size: 12px;
	color: #555;
	margin-bottom: 6px;
}

.easy-map-popup--fano .easy-map-popup__address {
	font-size: 11px;
	color: #777;
}

.easy-map-popup--fano + .easy-map-popup__actions {
	margin-top: 10px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}
