/*
Theme Name: The Exiles (Blocks)
Template: twentytwentyfive
Description: Block child theme of Twenty Twenty-Five for theexiles.org, replacing the Hello Elementor setup.
Version: 1.0.14
Requires at least: 6.7
Text Domain: exiles-blocks
*/

/* ---- Header / navigation ---- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
.exiles-main-nav .wp-block-navigation__submenu-container { border: 1px solid #333 !important; min-width: 220px !important; }
.exiles-main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 15px; font-weight: 400; padding: 8px 14px !important; }
.exiles-main-nav a:hover, .exiles-footer-nav a:hover { color: var(--wp--preset--color--contrast); }

/* ---- Details (was Elementor toggle) ---- */
.wp-block-details { border: 1px solid #555; padding: 0; }
.wp-block-details > summary { background: #333; color: #f4f4f4; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.wp-block-details > :not(summary) { padding-left: 16px; padding-right: 16px; }
.wp-block-details > ul.wp-block-list, .wp-block-details > ol.wp-block-list { padding-left: 2.5em; } /* indent bullets inside the box */
.wp-block-details[open] > summary { margin-bottom: 1em; }
.wp-block-column.has-background .wp-block-details { border: 0; }
.wp-block-column.has-background .wp-block-details > summary { background: #000; color: #f4f4f4; }

/* ---- Board bio cards (About Us) ---- */
.wp-block-column.has-background .wp-block-image.is-style-rounded img { width: 130px !important; height: 130px; object-fit: cover; }
.wp-block-column.has-background h3 { margin-bottom: 0; }
.wp-block-column.has-background p { font-size: 15px; line-height: 1.35; }
.wp-block-column.has-background a { color: #303030; }

/* ---- Forms ---- */
input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
	border: 1px solid #ddd; border-radius: 3px; background-color: #000; color: #eee; padding: 8px;
}

/* ---- MailPoet form ---- */
#mailpoet_form_1 form.mailpoet_form { background-color: #282828; color: ghostwhite; }
.mailpoet_form_image img { display: none; }
span.mailpoet-has-font, h2.mailpoet-heading.mailpoet-has-font-size { color: ghostwhite; }
input.mailpoet_submit[data-automation-id="subscribe-submit-button"] { background-color: #C8102E !important; }

/* ---- Events Manager ---- */
.em-list { display: flex; justify-content: center; }
.em-list .em-item { background-color: #000; padding: 10px; margin: 20px; flex: 1 1 0; min-width: 0; max-width: 250px; }
.em-events-list .em-item { max-width: 250px !important; }
.em-events-list .em-item .em-item-image { width: 100% !important; min-width: 0 !important; max-width: 100% !important; flex: 0 0 auto !important; }
.em-events-list .em-item .em-item-image img { width: 100% !important; height: auto !important; max-width: 100% !important; }
.em-list .em-event-categories { display: none; }
body:not(.home) .em-list { display: block; } /* card row on the front page only; Upcoming/Past pages list vertically */
.em.em-calendar .em-cal-nav .month-nav .em-calnav-today.is-today { opacity: 1; }
.em-cal-body { max-width: 100%; overflow: scroll; }
@media (max-width: 1000px) {
	.em-cal-head, .em-calnav-today { display: none !important; }
	body .em-list { flex-direction: column; }
	body .em-list .em-item { flex: 1 100%; min-width: 100% !important; max-width: none; }
}

/* Upcoming/Past pages: full-width rows, image left, details right (2026-11-18) */
body:not(.home) .em-events-list .em-item {
	max-width: none !important; display: flex; gap: 24px;
	align-items: flex-start; margin: 20px 0; padding: 16px;
}
body:not(.home) .em-events-list .em-item .em-item-image {
	flex: 0 0 250px !important; width: 250px !important;
}
body:not(.home) .em-events-list .em-item .em-item-info { flex: 1 1 auto; min-width: 0; }
@media (max-width: 700px) {
	body:not(.home) .em-events-list .em-item { flex-direction: column; }
	body:not(.home) .em-events-list .em-item .em-item-image { flex-basis: auto !important; width: 100% !important; }
}

/* ---- PMPro ---- */
#pmpro_confirmation-2 { color: #f0f0f0; padding: 15px; }

/* ------------------------------------------------------------------
   Month calendar ([events_calendar full="1"] on the Upcoming page).
   EM's calendar CSS is re-enabled for the calendar only (see functions.php);
   these rules re-skin it in the site palette. Since v1.0.4; dark skin v1.0.6.
   ------------------------------------------------------------------ */
.em.em-calendar {
	--calendar-background: #000;
	--date-box-border: 1px solid #333;
	--header-border: 1px solid #333;
	--header-background: transparent;
	--header-color: #A29F9F;
	--nav-color: #F0F0F0;
	--nav-border: 1px solid #555;
	--date-color: #B2B1B1;
	--date-background: transparent;
	--date-border-color: #555;
	--date-today-color: #F0F0F0;
	--date-today-background: transparent;
	--date-today-border: 2px solid #C8102E;
	--date-more-color: #A29F9F;
	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #F0F0F0;
}

/* Month title + picker */
.em.em-calendar .em-cal-nav .month input,
.em.em-calendar .em-cal-nav .month input[type=month] {
	font-family: Cabin, Roboto, sans-serif !important;
	font-size: 1.75rem !important;
	font-weight: 500;
	color: #F0F0F0 !important;
	background: transparent !important;
	color-scheme: dark;
}
.em.em-calendar .em-cal-nav .month { margin-left: 0; }
.em.em-calendar .em-cal-nav .month input { padding-left: 0 !important; }

/* Prev / next arrows (the SVG paths carry their own stroke attribute) */
.em.em-calendar .em-cal-nav .month-nav .em-calnav svg path { stroke: var(--nav-color); stroke-width: 1.5; }
.em.em-calendar .em-cal-nav .month-nav .em-calnav:hover,
.em.em-calendar .em-cal-nav .month-nav .em-calnav:hover svg,
.em.em-calendar .em-cal-nav .month-nav .em-calnav:hover path { filter: none !important; }
.em.em-calendar .em-cal-nav .month-nav .em-calnav:hover svg path { stroke: #A29F9F; }

/* "Today" = site button style */
.em.em-calendar .em-cal-nav .month-nav .em-calnav-today.size-large {
	background: #F0F0F0 !important;
	color: #000 !important;
	border: 0 !important;
	border-radius: 3px;
	font: 600 14px/36px Roboto, sans-serif !important;
	letter-spacing: .04em;
	padding: 0 18px !important;
	text-decoration: none !important;
}
.em.em-calendar .em-cal-nav .month-nav .em-calnav-today.size-large:not(.is-today):hover { background: #A29F9F !important; }
.em.em-calendar.size-small .em-cal-nav:not(.em-cal-nav-centered) .em-calnav-today.size-small { background: #C8102E !important; }

/* Weekday header */
.em.em-calendar .em-cal-head { border-radius: 3px 3px 0 0; }
.em.em-calendar .em-cal-head > div {
	font-family: Cabin, Roboto, sans-serif;
	font-weight: 500;
	letter-spacing: .06em;
	font-size: 14px;
}

/* Grid */
.em.em-calendar .em-cal-body { border-left: 1px solid #333; border-right: 1px solid #333; }
.em.em-calendar .em-cal-body .em-cal-day { border-color: #333 !important; }
.em.em-calendar .em-cal-body .em-cal-day.eventful .em-cal-day-date a { color: #F0F0F0 !important; font-weight: 600; }
.em.em-calendar .em-cal-body .em-cal-day .em-cal-day-date a:hover { background: #333 !important; }

/* Today: red ring, like the site's red accent */
.em.em-calendar .em-cal-body .em-cal-day.eventful-today .em-cal-day-date a,
.em.em-calendar .em-cal-body .em-cal-day.eventless-today .em-cal-day-date span {
	border: 2px solid #C8102E !important;
	color: #F0F0F0 !important;
	background: transparent !important;
}

/* Event pills keep their category color; tidy the text */
.em.em-calendar .em-cal-body.event-style-pill .em-cal-event > div { border-radius: 3px; font-size: 13px; }
.em.em-calendar .em-cal-body.event-style-pill .em-cal-event > div a { font-weight: 600; }

/* Phones/tablets: event days = dark-gray dot under the category ring
   (white-category events stay visible) */
.em.em-calendar.size-small .em-cal-body .em-cal-day.eventful .em-cal-day-date a,
.em.em-calendar.size-medium .em-cal-body .em-cal-day.eventful .em-cal-day-date a {
	background: #333 !important;
	color: #F0F0F0 !important;
}
.em.em-calendar.size-small .em-cal-body { border-left: 0; border-right: 0; border-bottom: 0; }

/* ------------------------------------------------------------------
   Calendar date-tap popup (v1.0.8). EM's widget layout gives the image a
   150px column but sets img width:auto, so the 240px source image spilled
   under the event text. Keep it inside its column.
------------------------------------------------------------------ */
.em.em-modal .em-list-widget .em-item .em-item-image img {
	width: 100% !important; max-width: 150px; height: auto !important; padding: 0;
}

/* ------------------------------------------------------------------
   Single event: "Add To Calendar" dropdown (v1.0.8). EM's CSS is off
   (dbem_css = 0), so nothing hid the menu links: they showed inline under
   the button. Hide them until EM's JS opens the menu (it removes this class
   while open), and give the open menu a dark site-palette box.
------------------------------------------------------------------ */
.em-tooltip-ddm-content {
	position: absolute !important; width: 1px !important; height: 1px !important;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap;
	margin: 0; padding: 0; border: 0;
}
.em-add-to-calendar-tooltip .tippy-box {
	background: #111; color: #F0F0F0; border: 1px solid #333; border-radius: 4px;
}
.em-add-to-calendar-tooltip .tippy-content { padding: 4px 0; }
.em-add-to-calendar-tooltip a {
	display: block; padding: 8px 14px; color: #F0F0F0; text-decoration: none; white-space: nowrap;
}
.em-add-to-calendar-tooltip a:hover,
.em-add-to-calendar-tooltip a:focus { background: #333; color: #fff; outline: 0; }
/* v1.0.9: EM sizes the menu to the button's width (data-button-width="match"),
   which clipped "Google Calendar". Let it grow to fit its links. */
.em-add-to-calendar-tooltip .tippy-box { max-width: none !important; }
.em-add-to-calendar-tooltip .em-event-add-to-calendar-content { width: auto !important; min-width: 100%; }

/* ------------------------------------------------------------------
   Content images (v1.0.10). Hello Elementor's reset shrank oversized images;
   TT5 doesn't for classic (non-block) content, so hard-coded images like the
   1200px Forbidden Tickets banner in 42+ events overflowed phones and made the
   whole page scroll sideways. :where() keeps this at the lowest specificity so
   block/EM image rules still win.
------------------------------------------------------------------ */
.wp-block-post-content :where(img) { max-width: 100%; height: auto; }

/* ---- v1.0.11 (2026-11-19): phones in landscape ---- */
/* Home event cards: side by side (fixed-size, centered) between 600px and 1000px instead of one full-width card each */
@media (min-width: 600px) and (max-width: 1000px) {
	body.home .em-list { flex-direction: row; flex-wrap: wrap; justify-content: center; }
	body.home .em-list .em-item { flex: 0 1 220px; min-width: 0 !important; max-width: 220px !important; margin: 10px; }
}
/* Short landscape screens: no content image taller than the screen (stacked columns, classic images) */
@media (orientation: landscape) and (max-height: 500px) {
	.wp-block-post-content :where(img) { width: auto; max-height: 80vh; max-height: 80svh; object-fit: contain; }
}

/* ---- 18+ entry gate (v1.0.12, restyled v1.0.13 to the customer's reference image; markup + cookie script in functions.php) ---- */
.exiles-age-gate { display: none; }
html.exiles-age-pending, html.exiles-age-pending body { overflow: hidden; }
html.exiles-age-pending .exiles-age-gate {
	display: flex; position: fixed; inset: 0; z-index: 100000;
	align-items: center; justify-content: center; padding: 16px;
	background: rgba(8, 8, 14, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.exiles-age-gate__box {
	width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
	padding: 44px 44px 36px; text-align: center; background: #fff; color: #1a1a1a; border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	font-family: var(--wp--preset--font-family--roboto, system-ui, sans-serif);
}
.exiles-age-gate__icon {
	display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; margin: 0 auto 22px;
	border-radius: 50%; background: #f3f3f3; color: #1a1a1a;
}
.exiles-age-gate__title { margin: 0 0 10px; font-size: 28px; font-weight: 600; line-height: 1.2; color: #1a1a1a; }
.exiles-age-gate__text { margin: 0 0 30px; font-size: 17px; line-height: 1.6; color: #555; }
.exiles-age-gate__buttons { display: flex; flex-direction: column; gap: 12px; }
.exiles-age-gate__enter, .exiles-age-gate__leave {
	display: block; box-sizing: border-box; width: 100%; padding: 15px 20px; border-radius: 8px; cursor: pointer;
	font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none;
}
.exiles-age-gate__enter { background: #222; color: #fff; border: 1px solid #222; }
.exiles-age-gate__enter:hover, .exiles-age-gate__enter:focus-visible { background: #000; }
.exiles-age-gate__leave { background: #fff; color: #555; border: 1px solid #ddd; }
.exiles-age-gate__leave:hover, .exiles-age-gate__leave:focus-visible { color: #1a1a1a; border-color: #bbb; }
.exiles-age-gate__enter:focus-visible, .exiles-age-gate__leave:focus-visible, .exiles-age-gate__remember-box:focus-visible { outline: 2px solid #C8102E; outline-offset: 2px; }
.exiles-age-gate__remember { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 15px; color: #777; cursor: pointer; }
.exiles-age-gate__remember-box { width: 18px; height: 18px; margin: 0; accent-color: #222; cursor: pointer; }
@media (max-width: 480px) {
	.exiles-age-gate__box { padding: 32px 22px 26px; }
	.exiles-age-gate__title { font-size: 24px; }
	.exiles-age-gate__text { font-size: 16px; margin-bottom: 24px; }
}
/* v1.0.14: "I Am Under 18" swaps in the sorry card (no cookie, re-asks on every load) */
.exiles-age-gate__box[hidden] { display: none; }
.exiles-age-gate__sorry .exiles-age-gate__title:focus { outline: none; }
.exiles-age-gate__text--last { margin-bottom: 0; }
