/**
 * Dark mode for the whole site (Travel Monster theme + library).
 * Active when <html data-eat-theme="dark">, set before first paint by an
 * inline script (saved choice, otherwise the system preference).
 * Colours meet WCAG AA contrast on the dark surfaces.
 */

/* ---------- Toggle button (both modes) ---------- */
.eat-theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; margin: 0 4px;
	border: 1px solid currentColor; border-radius: 50%;
	background: transparent; color: inherit; cursor: pointer; line-height: 1;
	flex: 0 0 auto;
}
.eat-theme-toggle:hover { background: rgba(127, 127, 127, .15); }
.eat-theme-toggle:focus-visible { outline: 3px solid #f5b26b; outline-offset: 2px; }
.eat-theme-toggle svg { width: 20px; height: 20px; display: block; }
.eat-theme-toggle .eat-i-sun { display: none; }
html[data-eat-theme="dark"] .eat-theme-toggle .eat-i-sun { display: block; }
html[data-eat-theme="dark"] .eat-theme-toggle .eat-i-moon { display: none; }
.eat-theme-toggle--float {
	position: fixed; left: 16px; bottom: 16px; z-index: 9990;
	background: #fff; color: #1e6b62; border-color: #1e6b62; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
body.eat-has-bar .eat-theme-toggle--float { bottom: 88px; }
.eat-theme-toggle--mobile { width: 40px; height: 40px; margin: 0 12px 0 8px; color: #fff; border-color: rgba(255, 255, 255, .75); align-self: center; }
.mobile-header .srch-moblop-wrap { display: flex; align-items: center; }
.site-header .navigation-wrap { display: flex; align-items: center; }
.eat-theme-toggle--desk { margin: 0 12px; color: var(--tmp-heading-color, #1c2011); }
.site-header .travel-monster-nav-wrapper .eat-theme-toggle { margin-left: 8px; }
html[data-eat-theme="dark"] .eat-theme-toggle--float { background: #1d2422; color: #f5b26b; border-color: #f5b26b; }

/* Smooth switch (not on first paint). */
html.eat-theme-anim, html.eat-theme-anim body, html.eat-theme-anim body * {
	transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}

/* ---------- Dark palette ---------- */
html[data-eat-theme="dark"] {
	color-scheme: dark;
	--eat-bg: #121614;
	--eat-surface: #1b211f;
	--eat-surface-2: #232b28;
	--eat-text: #e4e6e3;
	--eat-text-muted: #aeb5b1;
	--eat-heading: #f4f5f2;
	--eat-border: #33403b;
	--eat-link: #6fd6c8;

	/* Theme (Travel Monster) */
	--tmp-background-color: #121614;
	--tmp-background-color-rgb: 18, 22, 20;
	--tmp-body-font-color: #e4e6e3;
	--tmp-body-font-color-rgb: 228, 230, 227;
	--tmp-heading-color: #f4f5f2;
	--tmp-heading-color-rgb: 244, 245, 242;
	--tmp-section-bg-color: #1b211f;
	--tmp-section-bg-color-rgb: 27, 33, 31;
	--font-color: #e4e6e3;
	--font-color-rgb: 228, 230, 227;
	--white-color: #1b211f;

	/* Elementor globals */
	--e-global-color-body_font_color: #e4e6e3;
	--e-global-color-heading_color: #f4f5f2;
	--e-global-color-section_bg_color: #1b211f;
	--e-global-color-site_bg_color: #121614;
	--e-global-color-accent_color_one: #1b211f;
	--e-global-color-accent_color_two: #232b28;

	/* Library */
	--eat-teal-dark: #6fd6c8;
	--eat-teal-tint: #1f3330;
	--eat-sand: #232b28;
	--eat-ink: #f4f5f2;
	--eat-muted: #aeb5b1;
	--eat-line: #33403b;
	--eat-focus: 3px solid #6fd6c8;
}

html[data-eat-theme="dark"] body { background-color: var(--eat-bg); color: var(--eat-text); }
html[data-eat-theme="dark"] h1, html[data-eat-theme="dark"] h2, html[data-eat-theme="dark"] h3,
html[data-eat-theme="dark"] h4, html[data-eat-theme="dark"] h5, html[data-eat-theme="dark"] h6 { color: var(--eat-heading); }

/* Links in running text */
html[data-eat-theme="dark"] .entry-content a:not(.eat-btn):not(.wp-block-button__link),
html[data-eat-theme="dark"] .page-content a:not(.eat-btn),
html[data-eat-theme="dark"] .widget a,
html[data-eat-theme="dark"] .eat-main a:not(.eat-btn):not(.eat-chip) { color: var(--eat-link); }

/* Theme surfaces that hard-code white */
html[data-eat-theme="dark"] .site-header .header-b,
html[data-eat-theme="dark"] .site-header .sticky-holder,
html[data-eat-theme="dark"] .mobile-header,
html[data-eat-theme="dark"] .mobile-header .header-bottom-slide,
html[data-eat-theme="dark"] .mobile-header-popup,
html[data-eat-theme="dark"] .primary-navigation .sub-menu,
html[data-eat-theme="dark"] .search-modal,
html[data-eat-theme="dark"] .search-toggle-form,
html[data-eat-theme="dark"] .widget,
html[data-eat-theme="dark"] .site-content,
html[data-eat-theme="dark"] .post, html[data-eat-theme="dark"] .page,
html[data-eat-theme="dark"] article,
html[data-eat-theme="dark"] .comment-respond,
html[data-eat-theme="dark"] .author-section,
html[data-eat-theme="dark"] .post-navigation,
html[data-eat-theme="dark"] .navigation .nav-links a {
	background-color: transparent;
}
html[data-eat-theme="dark"] .site-header .header-b,
html[data-eat-theme="dark"] .site-header .sticky-holder,
html[data-eat-theme="dark"] .mobile-header .header-bottom-slide,
html[data-eat-theme="dark"] .mobile-header-popup,
html[data-eat-theme="dark"] .primary-navigation .sub-menu,
html[data-eat-theme="dark"] .search-modal { background-color: var(--eat-bg) !important; }
html[data-eat-theme="dark"] .primary-navigation a,
html[data-eat-theme="dark"] .mobile-header-popup a,
html[data-eat-theme="dark"] .site-title a,
html[data-eat-theme="dark"] .site-description { color: var(--eat-text) !important; }
html[data-eat-theme="dark"] .primary-navigation .current-menu-item > a,
html[data-eat-theme="dark"] .primary-navigation a:hover { color: var(--eat-link) !important; }

/* Logo: the dark lettering is swapped for a light version */
html[data-eat-theme="dark"] .custom-logo { content: var(--eat-logo-dark, none); }

/* Cards, boxes, widgets */
html[data-eat-theme="dark"] .widget-area .widget,
html[data-eat-theme="dark"] .wp-block-group.has-background:not(.has-text-color),
html[data-eat-theme="dark"] .eat-card,
html[data-eat-theme="dark"] .eat-download,
html[data-eat-theme="dark"] .eat-panel,
html[data-eat-theme="dark"] .eat-pass,
html[data-eat-theme="dark"] .eat-reader__toc,
html[data-eat-theme="dark"] .eat-chip,
html[data-eat-theme="dark"] .eat-reader__size button { background-color: var(--eat-surface) !important; border-color: var(--eat-border) !important; }
html[data-eat-theme="dark"] .eat-btn--ghost { background: transparent; color: var(--eat-link); border-color: var(--eat-link); }
html[data-eat-theme="dark"] .eat-btn--ghost:hover { background: var(--eat-teal-tint); color: var(--eat-link); }
html[data-eat-theme="dark"] .eat-btn--primary { background: #1e6b62; color: #fff; }
html[data-eat-theme="dark"] .eat-btn--primary:hover { background: #24857a; color: #fff; }
html[data-eat-theme="dark"] .eat-prose .box.know .box-title { color: #f0b46a; }
html[data-eat-theme="dark"] .eat-prose .box.avoid { background: #2c1c1a; }
html[data-eat-theme="dark"] .eat-prose .box.avoid .box-title { color: #f19a8e; }
html[data-eat-theme="dark"] .eat-prose .box.know { border-left-color: #d9934a; }
html[data-eat-theme="dark"] .eat-prose .box.avoid { border-left-color: #e0705f; }
html[data-eat-theme="dark"] .eat-reader__text figure img,
html[data-eat-theme="dark"] .eat-prose figure img { background: #f7f1e8; border-radius: 8px; }

/* Teal used as a background stays deep (white text on it), only teal text gets lighter. */
html[data-eat-theme="dark"] .eat-sights li::before,
html[data-eat-theme="dark"] .eat-how-steps__n,
html[data-eat-theme="dark"] .eat-home-facts,
html[data-eat-theme="dark"] .eat-unlock-bar,
html[data-eat-theme="dark"] .eat-dashboard #loginform .button,
html[data-eat-theme="dark"] .eat-card__cover { background-color: #1e6b62; color: #fff; }
html[data-eat-theme="dark"] .eat-download { border-color: #2f8c80 !important; }

/* Homepage and library text set in fixed greys */
html[data-eat-theme="dark"] .eat-home-hero { background: linear-gradient(180deg, #1d2422 0%, #18201d 100%); border-color: var(--eat-border); }
html[data-eat-theme="dark"] .eat-home-hero__lead,
html[data-eat-theme="dark"] .eat-home-section__intro,
html[data-eat-theme="dark"] .eat-region-card__desc,
html[data-eat-theme="dark"] .eat-feature p,
html[data-eat-theme="dark"] .eat-how-steps p,
html[data-eat-theme="dark"] .eat-home-formats__text p,
html[data-eat-theme="dark"] .eat-formats p,
html[data-eat-theme="dark"] .eat-article__excerpt,
html[data-eat-theme="dark"] .eat-qa__a,
html[data-eat-theme="dark"] .eat-home-about p,
html[data-eat-theme="dark"] .eat-reader__text .chapter-lead { color: var(--eat-text-muted); }
html[data-eat-theme="dark"] .eat-region-card,
html[data-eat-theme="dark"] .eat-home-how,
html[data-eat-theme="dark"] .eat-feature,
html[data-eat-theme="dark"] .eat-article { background-color: var(--eat-surface); border-color: var(--eat-border); }
html[data-eat-theme="dark"] .eat-home-search input[type=search] { background: var(--eat-surface-2); border-color: #5b6762; }
html[data-eat-theme="dark"] .eat-status__line--expired { color: #f19a8e; }

/* Store look */
html[data-eat-theme="dark"] .eat-card__stage,
html[data-eat-theme="dark"] .eat-product__stage {
	background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--eat-tint, #1e6b62) 30%, #1b211f) 0%, color-mix(in srgb, var(--eat-tint, #1e6b62) 16%, #121614) 100%);
}
html[data-eat-theme="dark"] .eat-buy { background-color: var(--eat-surface); border-color: var(--eat-border); box-shadow: none; }
html[data-eat-theme="dark"] .eat-card:hover { box-shadow: 0 12px 30px -12px rgba(0,0,0,.7); }
html[data-eat-theme="dark"] .eat-look__thumb img { border-color: var(--eat-border); }
html[data-eat-theme="dark"] .eat-progress { background: var(--eat-border); }

/* Forms */
html[data-eat-theme="dark"] input[type="text"], html[data-eat-theme="dark"] input[type="email"],
html[data-eat-theme="dark"] input[type="search"], html[data-eat-theme="dark"] input[type="password"],
html[data-eat-theme="dark"] input[type="url"], html[data-eat-theme="dark"] input[type="number"],
html[data-eat-theme="dark"] textarea, html[data-eat-theme="dark"] select {
	background-color: var(--eat-surface-2) !important; color: var(--eat-text) !important; border-color: var(--eat-border) !important;
}
html[data-eat-theme="dark"] ::placeholder { color: #8e9792; }
/* Header search fields sit on the teal bar: keep them as the theme draws them. */
html[data-eat-theme="dark"] .mobile-header .search-field,
html[data-eat-theme="dark"] .site-header .header-m .search-field { background-color: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .5) !important; }
html[data-eat-theme="dark"] .mobile-header .search-field::placeholder { color: rgba(255, 255, 255, .8); }
html[data-eat-theme="dark"] .mobile-header .search-modal,
html[data-eat-theme="dark"] .mobile-header .search-toggle-form,
html[data-eat-theme="dark"] .mobile-header .header-search-inner { background-color: transparent !important; }

/* Tables, quotes, code */
html[data-eat-theme="dark"] table th, html[data-eat-theme="dark"] table td { border-color: var(--eat-border); }
html[data-eat-theme="dark"] blockquote { border-color: var(--eat-link); color: var(--eat-text); }
html[data-eat-theme="dark"] code, html[data-eat-theme="dark"] pre { background: var(--eat-surface-2); color: var(--eat-text); }
html[data-eat-theme="dark"] hr { border-color: var(--eat-border); background-color: var(--eat-border); }

/* Footer: keep the brand teal, a little deeper */
html[data-eat-theme="dark"] .site-footer .footer-wrap-main,
html[data-eat-theme="dark"] .site-footer .footer-b { background-color: #14423d !important; }

/* Unlock bar */
html[data-eat-theme="dark"] .eat-unlock-bar { background: var(--eat-surface); color: var(--eat-text); border-top-color: var(--eat-border); }
