/* ==========================================================================
   Donaloop chrome restyle
   Overrides the legacy orange/violet/cyan selectors in jaidee-style.css /
   jaidee-responsive.css with the navy/orange Donaloop identity, using the
   tokens defined in donaloop-tokens.css (load this file after both).
   Selectors are copied 1:1 from jaidee-style.css so specificity matches and
   the cascade (later file wins) does the overriding — no !important needed
   except where the legacy rule itself used !important.
   Scope: shared chrome (header, nav, buttons, cards, footer, modal, accordion)
   plus the Home / How it Works / Our Cause page headings.
   ========================================================================== */

/* ---- Type: display headlines are black, not orange/violet/navy — per the
   brand readme ("headlines... are black — never navy or orange") and
   SectionHeading.jsx (heading color is always --text-strong unless a dark
   band forces white; there is no navy heading state). ---- */
.container .row h1 { color: var(--text-strong); font-weight: var(--fw-black); }
.container .row h2 { color: var(--text-strong); font-weight: var(--fw-black); }
.container .row h3 { color: var(--text-strong); font-weight: var(--fw-bold); }

/* ---- Back-to-top button: brand accent orange, not the legacy #FF9800/#5c3586
   pairing. ---- */
/* Minimal: small white circle, hairline border, soft shadow, thin navy chevron;
   accent only on hover. */
#top-button { width: 40px; height: 40px; border-radius: 50%; background-color: #fff; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); bottom: 24px; right: 24px; }
#top-button::after { content: "\f106"; font-size: 22px; line-height: 38px; color: var(--brand-primary); transition: color .3s; }
#top-button:hover { background-color: #fff; border-color: var(--brand-accent); }
#top-button:hover::after { color: var(--brand-accent); }
#top-button:active { background-color: var(--border-subtle); }

/* ---- Shared "clear filters" link + category page <h1> used by both the
   stores directory and the marketplace item list — replaces per-page inline
   style="color:#68696a"/"color:#5c3586" hex. ---- */
.dl-text-muted-link { color: var(--text-muted); }
/* Exact spec from SectionHeading.jsx level=2: fw-black (not bold), font-display,
   lh-heading, ls-display tracking — not an approximation.
   Scoped as ".page-stores h1.dl-category-title" (specificity 0,2,1) to tie
   jaidee-style.css's ".container .row h1" (same 0,2,1) on font-size/margin —
   a bare ".dl-category-title" (0,1,0) loses that fight regardless of load
   order, since equal-or-higher specificity always wins before cascade order. */
.page-stores h1.dl-category-title { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-black); line-height: var(--lh-heading); letter-spacing: var(--ls-display); color: var(--text-strong); margin: 10px 0 18px; }

/* Marketplace "Add Item" button — scoped override so the global Bootstrap
   .btn-success (used across admin too) is left untouched. */

/* ---- Stores directory + marketplace category browser (page-stores). The
   sidebar no longer has the old violet background image (sidebar-violet
   class removed from the blade views), so it needs its own light card
   surface instead of relying on that image for contrast against the white
   page background; sidebar text switches from white to the standard body
   token to stay readable on that surface. ---- */
/* Cancel jaidee-style.css's ".page-stores { border:1px solid #888888 }" — the
   store-list-screen.kit.js design has no wrapping border around the whole
   page content, only the sidebar "Refine results" card (.dl-refine-card) has
   its own border. A bare removal of an override here doesn't work — the
   legacy rule still applies unless explicitly cancelled. */
.page-stores { border: none; }
.menu-category { background: var(--surface-muted); border-radius: var(--radius-md); }
.menu-category p, .page-stores .menu-category a, .page-stores .menu-category strong, .page-stores .menu-category i, .page-stores .menu-category h3 { color: var(--text-body); }
.page-stores .set-text-box-desc { background: var(--brand-accent); }
.sidebar-title { border-bottom: 1px solid var(--border-subtle); }
.sidebar-title:after, .refine_result:after { background: var(--border-subtle); }
.page-stores .menu-category .detail_letter a.letter_active { background: var(--brand-accent); }
.page-stores .menu-category .refine_result { border-bottom: 1px solid var(--border-subtle); }
.page-stores .menu-category .detail > p > a.cat_active { color: var(--brand-primary); }
.box-filter-country { border-bottom: 1px solid var(--border-subtle); }
.box-filter-country:after { background: var(--border-subtle); }
.page-stores .sidebar-search .btn { background: var(--brand-primary); border: 1px solid var(--brand-primary); }
button#add-shortcut { background: var(--brand-accent); }

/* ---- Member area: cashback/commission status summary cards + pagination.
   Fixed semantic mapping per the design system (pending=navy, cleared=orange,
   requested=amber, paid=green) — uses the --status-* aliases already defined
   in donaloop-tokens.css, never re-colored per screen. ---- */
.dl-status-card { color: var(--white); }
.dl-status-card--pending { background-color: var(--status-pending-fg); }
.dl-status-card--cleared { background-color: var(--status-cleared-fg); }
.dl-status-card--requested { background-color: var(--status-requested-fg); }
.dl-status-card--paid { background-color: var(--status-paid-fg); }

/* ---- Header: one continuous navy bar — a slim utility strip (lang switch +
   login, NO logo) over the main row (logo once + nav), per NavBar.jsx. The
   old markup showed the logo twice (utility strip AND main row) and buried
   login/signup inside the nav list; layout.blade.php now renders login in
   the utility strip instead (main-menu.blade.php no longer has it). ---- */
#layout-top.bg-top-logo { background: var(--brand-primary); }
/* jaidee-responsive.css widens .container to 1200px/1400px (nearly full
   viewport) at large screens site-wide — a long-standing, intentional choice
   for the rest of the site that we're not touching globally. But it means
   the header content padding, tied to .container's width, stretches
   edge-to-edge instead of staying centered at the design's 1140px. Cap just
   the header's own container for that (navy background still bleeds full
   width — that part is correct either way). */
#layout-top .container { max-width: var(--container-max) !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
/* Same fix, extended to the redesigned page content below the header: the
   site-wide .container override (1200/1400px at XL/XXL) made the header
   line up at 1140px while the hero/section content beneath it stayed wider,
   visibly misaligned against it. Cap the containers inside the sections this
   pass touched (Home hero/bands + the shared category block) to match. */
.dl-hero .container,
.dl-section .container,
#layout-content-category .container,
.dl-cause-strip .container,
.dl-breadcrumb-bar .container,
.page-stores {
	max-width: var(--container-max) !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
/* Bootstrap's .container keeps its own 15px side padding even once it's
   hit the 1140px cap, so measured content width was 1110px, not 1140 — the
   design's own container has no such padding once centred (verified against
   the reference bundle: a two-column heading that fits on one line there at
   1140px content width was wrapping here). Zero it only once the container
   is wide enough to actually be at the cap; below that it's still needed as
   the mobile/tablet edge gutter. */
@media (min-width: 1170px) {
	#layout-top .container,
	.dl-hero .container,
	.dl-section .container,
	#layout-content-category .container,
	.dl-cause-strip .container,
	.dl-breadcrumb-bar .container {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}
/* .page-stores gets this unconditionally rather than gated at 1170px like the
   rules above — unlike those, its own max-width:1140px is set unconditionally
   too (not stepped up progressively with the viewport), so it sits "at the
   cap" as soon as the viewport can fit it at all, not just past 1170px. Kept
   separate to avoid re-litigating the other sections' already-verified
   behavior. Mobile still gets its edge gutter back below 768px. */
.page-stores { padding-left: 0 !important; padding-right: 0 !important; }
@media (max-width: 767px) {
	.page-stores { padding-left: 15px !important; padding-right: 15px !important; }
}
/* The divider line itself is a DIFFERENT story: per NavBar.jsx the utility
   strip's border-bottom sits on a full-viewport-width outer wrapper, with
   only the content *inside* it centered at 1140px — i.e. the line spans
   edge-to-edge while the EN/TH/login sit in a narrower centered strip within
   it. Capping .container (above) would wrongly shrink the line too, so draw
   it as its own full-width layer instead of a plain border. */
.header-top-section { position: relative; border-bottom: 0; margin-bottom: 0 !important; }
.header-top-section::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 100vw;
	transform: translateX(-50%);
	border-bottom: var(--border-width) solid var(--border-invert);
}
/* jaidee-style.css gives .header-nav-section a 30px bottom margin meant for
   the old design's looser rhythm — it now shows up as dead white space
   between the navy header and the page content below. NavBar has no such
   gap: the header ends where its own padding ends. */
.header-nav-section { margin-bottom: 0 !important; }
.top-jaidee-logo, .mobile-logo { display: inline-block; }
.top-jaidee-logo img, .mobile-logo img { height: 40px; width: auto; }
/* NavBar.jsx renders the main-row logo at a fixed 56px height. */
.header-main-logo img { height: 56px; width: auto; }
.charity-widget { background: rgba(255,255,255,.08); border-radius: var(--radius-md); }
.charity-widget-box, .charity-widget-box p, .charity-widget-box span, .charity-widget-box strong { color: var(--white); }
@media (min-width: 768px) {
	.top-jaidee-logo, .top-cashback-logo { display: none !important; }
	/* jaidee-responsive.css hides .header-main-logo between 768–1199px (it
	   expected .top-jaidee-logo to carry the logo at that width instead) —
	   force it visible everywhere now that .top-jaidee-logo is retired. */
	.header-main-logo { display: block !important; }
	/* header-main-logo only carries a col-xl-2 class and header-main-menu only
	   col-lg-12/col-xl-10 — below 992px neither Bootstrap grid class is active,
	   so the two items fought over width and the nav block wrapped entirely
	   below the logo instead of sharing the row. Force them into a fixed
	   logo + flexible nav split at every desktop width, overriding whichever
	   Bootstrap col-* class happens to apply above 992px too. */
	.header-nav-section { display: flex !important; align-items: flex-start !important; flex-wrap: nowrap !important; padding: var(--space-3) 0 !important; }
	/* .header-main-logo still carries Bootstrap's col-xl-2 class, which adds
	   its own 15px left/right column gutters — that leftover left padding was
	   inset the logo further than the container edge, unlike the nav items
	   next to it. Reset it and set only the intended right-side gap. */
	.header-main-logo { flex: 0 0 auto !important; max-width: none !important; width: auto !important; padding: 0 var(--space-5) 0 0 !important; }
	.header-main-menu { flex: 1 1 auto !important; max-width: none !important; width: auto !important; min-width: 0; }
	/* NavBar.jsx's <nav>: display:flex, justifyContent:'flex-end', flexWrap:'wrap'.
	   Legacy CSS instead gives .navbar-nav "display:block;text-align:right" at
	   768–991px (a bigger, inconsistent gap after the logo) and plain block/
	   start alignment above that (hugs the logo with almost no gap) — two
	   different, both-wrong behaviors depending on width. Force the one
	   consistent flex-end behavior at every desktop width. */
	#main-menu { display: flex !important; align-items: center; }
	#main-menu .navbar-nav {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: wrap !important;
		justify-content: flex-end !important;
		align-items: center !important;
		text-align: left !important;
		width: 100%;
	}
	#main-menu .navbar-nav > li:not(.nav-li-search) { display: flex !important; float: none !important; }
	.header-top-section {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: var(--space-4);
		padding: var(--space-2) 0 !important;
	}
	.header-top-section > [class*="col-"] { flex: 0 0 auto; width: auto; max-width: none; }
	/* jaidee-responsive.css adds padding-top:25px (768–991px) or 30px
	   (992–1199px) to .menu-lang, a leftover from the old layout where the
	   utility strip had no flex alignment of its own. That extra top padding
	   was inflating the whole utility-strip row's height. */
	.menu-lang { padding-top: 0 !important; padding-right: 0 !important; position: static !important; bottom: auto !important; }
}
.menu-lang { text-align: left; }
.menu-lang ul { display: flex; gap: 6px; margin: 0; padding: 0; }
.menu-lang ul li { display: inline-flex; list-style: none; }
.menu-lang ul li a.layout_select_lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: var(--radius-xs);
	font-size: var(--fs-micro);
	line-height: 1;
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-label);
	color: var(--white);
	opacity: .75;
	border: 1px solid transparent;
	background: transparent;
	transition: var(--transition-control);
	box-sizing: border-box;
}
.menu-lang ul li a.layout_select_lang img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
/* jaidee-style.css's global "p, li, span { font-size: 14px; }" was winning
   over the inherited 12px on the "EN"/"TH" text span — a direct rule on the
   element always beats an inherited value, regardless of specificity. */
.menu-lang ul li a.layout_select_lang span { font-size: inherit; line-height: inherit; font-weight: inherit; }
/* jaidee-style.css's ".header-top-section .menu-lang a.active" sets an
   outline (a separate property from border, so it doesn't get overridden by
   the border-color below — both were rendering at once, making the active
   pill look chunkier than the reference's plain 1px border). Cancel it. */
.header-top-section .menu-lang a.active { outline: none; }
.menu-lang ul li a.layout_select_lang.active { opacity: 1; background: rgba(255,255,255,.18); border-color: var(--brand-accent); }
/* onDark===false variant of LangSwitch.jsx — used on white panels (e.g. the
   login form panel) where the default white text would be invisible. */
.menu-lang--onlight ul li a.layout_select_lang { color: var(--text-body); }
/* Shop-section-only header search box (stores routes), per the shopping kit's
   own chrome variant — the general site header (home, how-it-works, etc.)
   has no search box, so this is scoped to layout.blade.php's route check.
   Exact spec: SearchInput onDark size="sm" (control-h-sm/34px, fs-body-sm). */
.dl-header-search { display: flex; align-items: center; }
.dl-header-search form { display: flex; align-items: center; background: rgba(255,255,255,.12); border: var(--border-width) solid var(--border-invert); border-radius: var(--radius-sm); overflow: hidden; }
.dl-header-search form:focus-within { border-color: var(--brand-accent); box-shadow: 0 0 0 3px var(--orange-100); }
.dl-header-search-input { border: 0; background: transparent; color: var(--white); font-family: var(--font-text); font-weight: var(--fw-medium); font-size: var(--fs-body-sm); line-height: 1; height: var(--control-h-sm); padding: 0 12px; width: 180px; }
.dl-header-search-input::placeholder { color: var(--navy-100); }
.dl-header-search-input:focus { outline: none; }
/* Icon comes first in the DOM (design: icon precedes the input, padding 0 0 0 14px) --
   this button IS the icon, functioning as the submit control since the design's own
   SearchInput only renders a bare decorative <i>, with no separate submit affordance. */
.dl-header-search button { border: 0; background: transparent; color: var(--navy-100); padding: 0 0 0 14px; align-self: stretch; display: inline-flex; align-items: center; cursor: pointer; }
.dl-header-search button:hover { color: var(--white); }

.dl-header-login { display: flex; align-items: center; gap: var(--space-3); white-space: nowrap; }
/* Button.jsx's "uppercase" prop — used for the header login/signup button —
   adds letter-spacing + text-transform on top of the base .dl-btn styles. */
.dl-header-login .dl-btn { text-transform: uppercase; letter-spacing: var(--ls-label); }
.dl-btn--ghost-invert { background: transparent; color: var(--white); border-color: var(--border-invert); }
.dl-btn--ghost-invert:hover { background: rgba(255,255,255,.14); color: var(--white); }

/* ---- Nav / main menu: white text on navy; only shop items get the pill ----
   Full audit against the live reference (components/navigation/NavBar.jsx's
   Item()) found: font-weight was losing to a more specific legacy selector
   (jaidee-style.css's "#main-menu .nav-li-shop-parent .nav-link" beats a
   plain "#main-menu .nav-link"), letter-spacing was missing entirely, and
   height/padding didn't match the spec's fixed 38px / "0 12px". Using the
   exact selector shape here to guarantee the win regardless of source order. */
#main-menu .navbar-nav > li > .nav-link,
#main-menu .navbar-nav > li > .nav-link.dropdown-toggle {
	color: var(--white);
	font-weight: var(--fw-bold);
	font-size: var(--fs-micro);
	letter-spacing: var(--ls-label);
	height: 38px;
	line-height: 38px;
	padding: 0 12px !important;
	box-sizing: border-box;
}
/* Bootstrap's reboot CSS underlines any <a> on hover by default — the "Our
   Cause" link and the language switch are real <a> tags (the rest are
   <span>, unaffected), so they'd pick up an underline the design never has. */
#main-menu .nav-link:hover,
.menu-lang a:hover,
#main-menu .dropdown-item:hover { text-decoration: none; }
#main-menu .nav-link:hover { color: var(--white); background: rgba(255,255,255,.14); border-radius: var(--radius-sm); }
/* jaidee-style.css hides the dropdown caret globally (#main-menu .nav-link:after
   {display:none}) — NavBar.jsx shows a small chevron on every item that opens
   a submenu (the 3 shop items). Restore it for dropdown-toggle items only. */
/* chrome.kit.js's items array: only the 3 shop pills and "Join" (nav-li-howto,
   the closest existing equivalent — merchant/member/agent/distributor signup)
   carry hasMenu:true. "How it Works" (nav-li-how) and "About" (nav-li-about)
   are plain links with no chevron in the design, even though production
   still opens a real submenu from them — hide the indicator, not the menu. */
#main-menu .nav-li-shop-parent .nav-link.dropdown-toggle:after,
#main-menu .nav-li-howto .nav-link.dropdown-toggle:after {
	display: inline-block !important;
	vertical-align: middle;
	margin-left: 6px;
}
#main-menu .nav-li-how .nav-link.dropdown-toggle:after,
#main-menu .nav-li-about .nav-link.dropdown-toggle:after {
	display: none !important;
}
/* NavBar.jsx's Item(): a "pill" item's resting background is the SAME navy
   as the header itself (i.e. invisible — just white uppercase text), and
   only turns solid orange on hover/active. It is not a permanently-visible
   dark box. */
#main-menu .nav-li-shop-parent .nav-link {
	background: transparent;
	color: var(--white);
	box-shadow: none;
	border-radius: var(--radius-sm);
}
#main-menu .nav-li-shop-parent .nav-link:hover,
#main-menu .nav-li-shop-parent.show .nav-link {
	background: var(--brand-accent);
	color: var(--white);
}
#main-menu .nav-li-member button {
	background: transparent;
	color: var(--white);
	border: 1px solid var(--border-invert);
	box-shadow: none;
	border-radius: var(--radius-sm);
}
#main-menu .nav-li-member button:hover { background: rgba(255,255,255,.14); color: var(--white); }
/* chrome.kit.js's NavBar has no search field at all — it's a production-only
   feature not in the design. Hide it from the nav (not delete: the input and
   its autocomplete JS wiring stay in the DOM, just visually removed here). */
.nav-li-search { display: none !important; }
/* Dropdown panels stay on a white surface, per the design's mega-menu treatment.
   jaidee-responsive.css paints these with a photo/illustration background
   (nav-shop-bg.jpg, nav-sub-bg.jpg), a 30px violet title and float:33% columns
   — none of that exists in the design (no mega-menu spec was included in the
   bundle at all, just the chevron on NavBar.jsx), so this is restyled from
   scratch using the same tokens as the rest of the chrome, not matched
   against a reference. */
#main-menu ul li a.dropdown-item { color: var(--text-body); }
#main-menu ul li a.dropdown-item:active { background: var(--navy-50); color: var(--brand-primary); }
.member-loggedin a { background: transparent; color: var(--white); box-shadow: none; border: 1px solid var(--border-invert); border-radius: var(--radius-sm); }

/* display is deliberately NOT set here — Bootstrap's .dropdown-menu{display:
   none} default has to keep hiding the other two panels; only .show should
   ever make one visible. Setting display:grid unconditionally on the base
   selector (an earlier version of this rule did) made all 3 dropdowns
   visible and stacked at once regardless of which pill was open, with the
   last one in DOM paint order covering the other two. */
#main-menu .nav-li-shop-parent ul.dropdown-menu {
	background-image: none !important;
	background-color: var(--white) !important;
	border: var(--border-width) solid var(--border-subtle) !important;
	border-radius: var(--radius-md) !important;
	box-shadow: var(--shadow-md) !important;
	min-height: 0 !important;
	width: auto !important;
	min-width: 560px;
	max-width: 720px;
	top: 100% !important;
	left: 0 !important;
	margin-top: 8px !important;
	padding: var(--space-6) !important;
	grid-template-columns: repeat(3, minmax(140px, 1fr));
	gap: var(--space-2) var(--space-5);
}
/* Bootstrap here toggles .show on the parent <li> (its own rule is
   ".show > .dropdown-menu"), never on the <ul> itself — a selector of
   "ul.dropdown-menu.show" matches nothing. */
#main-menu .nav-li-shop-parent.show > ul.dropdown-menu { display: grid !important; }
#main-menu .nav-li-shop-parent ul.dropdown-menu li.subitem-title {
	grid-column: 1 / -1;
	width: auto;
	margin: 0 0 var(--space-5) !important;
	padding: 0 0 var(--space-3) !important;
	border-bottom: var(--border-width) solid var(--border-subtle);
	color: var(--brand-primary);
	font-family: var(--font-display);
	font-size: var(--fs-h4) !important;
	font-weight: var(--fw-bold);
}
#main-menu .nav-li-shop-parent ul.dropdown-menu li.subitem-title a { color: var(--brand-primary); }
#main-menu .nav-li-shop-parent ul.dropdown-menu li { width: auto !important; float: none !important; margin-bottom: 0 !important; }
#main-menu .nav-li-shop-parent ul.dropdown-menu li a.dropdown-item {
	padding: 6px 0 !important;
	font-size: var(--fs-caption) !important;
	font-weight: var(--fw-semibold);
	color: var(--text-body);
}
#main-menu .nav-li-shop-parent ul.dropdown-menu li .row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
#main-menu .nav-li-shop-parent ul.dropdown-menu li .row > div { width: auto; padding: 0; }
#main-menu .nav-li-shop-parent ul.dropdown-menu li i { font-size: 16px !important; color: var(--brand-primary); }
#main-menu .nav-li-shop-parent ul.dropdown-menu li:hover .row div,
#main-menu .nav-li-shop-parent ul.dropdown-menu li:hover .row i { color: var(--brand-accent); }
#main-menu .nav-li-shop-parent ul.dropdown-menu li.see-all-store {
	grid-column: 1 / -1;
	width: auto !important;
	margin-top: var(--space-5) !important;
	padding-top: var(--space-5);
	border-top: var(--border-width) solid var(--border-subtle);
}
#main-menu .nav-li-shop-parent ul.dropdown-menu li.see-all-store a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px !important;
	background: var(--brand-accent);
	color: var(--white);
	border: var(--border-width) solid var(--brand-accent);
	border-radius: var(--radius-sm) !important;
	font-family: var(--font-text);
	font-size: var(--fs-body-sm) !important;
	font-weight: var(--fw-bold);
	margin-top: 0 !important;
}
#main-menu .nav-li-shop-parent ul.dropdown-menu li.see-all-store a:hover {
	background: var(--brand-accent-hover);
	border-color: var(--brand-accent-hover);
	color: var(--white);
}

/* Join + About us dropdowns — minimal: no photo, no title, no arrow; a small
   white card with a hairline border and plain text links. Desktop only (the
   mobile menu is rebuilt by mmenu and keeps its own list styling). */
@media (min-width: 768px) {
	.nav-li-howto .dropdown-menu,
	.nav-li-about .dropdown-menu {
		background-image: none !important;
		background-color: var(--white) !important;
		border: var(--border-width) solid var(--border-subtle) !important;
		border-radius: var(--radius-md) !important;
		box-shadow: var(--shadow-md) !important;
		min-height: 0 !important;
		width: auto !important;
		min-width: 180px;
		top: 100% !important;
		margin-top: 8px !important;
		padding: 6px !important;
	}
	.nav-li-howto .dropdown-menu .sub-menu-h2,
	.nav-li-about .dropdown-menu .sub-menu-h2 { display: none !important; }
	.nav-li-howto .dropdown-menu li a,
	.nav-li-about .dropdown-menu li a {
		display: block;
		padding: 9px 14px !important;
		margin: 0 !important;
		border-radius: 6px;
		color: var(--text-body) !important;
		font-size: 12px !important;
		font-weight: var(--fw-semibold) !important;
		letter-spacing: .02em;
		white-space: nowrap;
	}
	.nav-li-howto .dropdown-menu li a:hover,
	.nav-li-about .dropdown-menu li a:hover {
		color: var(--brand-primary) !important;
		background: var(--navy-50) !important;
	}
	.nav-li-howto.show .dropdown-menu:after,
	.nav-li-about.show .dropdown-menu:after { display: none !important; }
}
.nav-li-shop-parent.show:after { display: none !important; }

/* jaidee-responsive.css forces each shop pill to width:33.33% (a full-width
   3-column band) specifically between 768–991px, which eats the entire nav
   row and pushes every other item onto its own line. The Donaloop nav is
   compact pills at every desktop width — cancel that override. */
@media (min-width: 768px) {
	#main-menu .navbar-nav .nav-li-shop-parent {
		width: auto !important;
		float: none !important;
		margin: 0 8px 0 0 !important;
	}
	#main-menu .nav-li-shop-parent .nav-link { padding: 0 12px !important; height: 38px; line-height: 38px; }
}

/* ---- Buttons ---- */
form .btn { background: var(--brand-accent); color: var(--white); border-radius: var(--radius-sm); }
form .btn:hover { background: var(--brand-accent-hover); }
.btn-grad {
	background-image: none;
	background: var(--brand-accent);
	border-radius: var(--radius-sm);
	transition: background-color var(--dur-base) var(--ease-out);
}
.btn-grad:hover { background: var(--brand-accent-hover); color: var(--white); }
.orange { color: var(--brand-accent); }
.violet { color: var(--brand-primary); }

/* ---- "Box Jaidee" feature cards: hairline card instead of orange fill ---- */
.home-about-jaidee { background: var(--brand-primary); }
.box-jaidee div {
	background: var(--white);
	color: var(--text-body);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
}
.box-jaidee div strong, .box-jaidee div pre { color: var(--text-strong); }

/* ---- Accordion (FAQ) ---- */
.accordion-tab > ul > li:after { color: var(--brand-accent); }
.accordion-tab ul li.active h3 { color: var(--brand-primary) !important; }
.accordion-2-col ul li h3 { color: var(--brand-accent) !important; }

/* ---- Login / signup modal — rebuilt to Modal.jsx's header/body/footer shape.
   The real form has far more fields than the design mock (first/last name,
   country, agent referral, T&Cs, recaptcha — the mock only shows a 2-field
   login), so the extra signup fields are styled with the same TextInput.jsx
   language rather than removed. Markup was restructured in layout.blade.php
   to drop the old violet photo-panel column and swap the tab-strip's logo
   for a proper title bar; the .loginModal-tab / .loginModal-login /
   .loginModal-signup classes were kept as-is so custom.js's tab-toggle
   handlers (matched by those class names) still work unmodified. */
#loginModal.modal { background: var(--overlay-scrim); backdrop-filter: var(--blur-panel); -webkit-backdrop-filter: var(--blur-panel); }
#loginModal .modal-content {
	background: var(--surface-card) !important;
	border-radius: var(--radius-lg) !important;
	overflow: hidden;
	border: 0;
	width: 520px !important;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	padding: 0 !important;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%) !important;
	margin: 0 !important;
}
#loginModal .dl-modal-header {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-5) var(--space-6);
	background: var(--brand-primary);
	flex: 0 0 auto;
}
#loginModal .dl-modal-title {
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	font-size: var(--fs-h4);
	letter-spacing: var(--ls-display);
	color: var(--white);
}
#loginModal .close {
	position: static !important;
	margin-left: auto;
	background: none;
	border: 0;
	color: var(--white) !important;
	font-size: 22px;
	line-height: 1;
	opacity: .85;
	text-shadow: none;
}
#loginModal .close:hover { color: var(--white) !important; opacity: 1; }

#loginModal .loginModal-right { padding: 0 !important; vertical-align: top; left: auto; flex: 1 1 auto; overflow-y: auto; }
#loginModal .loginModal-right > div { width: auto; margin-bottom: 0; }
#loginModal .loginModal-right .loginModal-wrapper { margin: 0 !important; padding: 0 !important; box-shadow: none; border-radius: 0; }

#loginModal .loginModal-right .loginModal-tab { margin-bottom: 0; padding: 0 var(--space-6); border-bottom: var(--border-width) solid var(--border-subtle); background: var(--white); }
#loginModal .loginModal-right .loginModal-tab ul { display: flex; gap: var(--space-6); height: auto; }
#loginModal .loginModal-right .loginModal-tab ul li {
	display: block;
	float: none;
	width: auto;
	padding: var(--space-4) 0;
	text-align: left;
	border: 0;
	border-bottom: 3px solid transparent;
	background: var(--white);
	margin-bottom: -1px;
}
#loginModal .loginModal-right .loginModal-tab ul li.active {
	border: 0;
	border-bottom: 3px solid var(--brand-accent);
	background: var(--white);
}
#loginModal .loginModal-right .loginModal-tab ul li a { color: var(--text-muted); font-family: var(--font-text); font-weight: var(--fw-bold); font-size: var(--fs-body-sm); }
#loginModal .loginModal-right .loginModal-tab ul li.active a { color: var(--brand-primary); font-weight: var(--fw-bold); }
#loginModal .loginModal-right .loginModal-tab ul li:hover a { color: var(--brand-accent); }
#loginModal .loginModal-right .loginModal-tab ul li.active:hover a { color: var(--brand-primary); }

.loginModal-login, .loginModal-signup {
	height: auto !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--white);
	padding: var(--space-6) !important;
}
.loginModal-login { padding-top: var(--space-6) !important; }
.loginModal-signup { display: none; }

#loginModal .form-group { margin-bottom: var(--space-4); }
#loginModal form input, #loginModal form select {
	color: var(--text-strong) !important;
	background: var(--white);
	height: var(--control-h);
	width: 100%;
	box-sizing: border-box;
	padding: 0 14px;
	font-family: var(--font-text);
	font-weight: var(--fw-medium);
	font-size: var(--fs-body-sm);
	border: var(--border-width) solid var(--border-default) !important;
	border-radius: var(--radius-sm) !important;
	outline: none;
	transition: var(--transition-control);
}
#loginModal form input:focus, #loginModal form select:focus {
	border-color: var(--brand-primary) !important;
	box-shadow: 0 0 0 3px var(--navy-100);
}
#loginModal form input::placeholder { color: var(--text-subtle); }
#loginModal .checkbox label, #loginModal label:not(.form-group label) {
	font-family: var(--font-text);
	font-weight: var(--fw-bold);
	font-size: var(--fs-micro);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: var(--text-muted);
}
#loginModal .checkbox label { text-transform: none; font-weight: var(--fw-medium); letter-spacing: 0; color: var(--text-body); }
#loginModal .checkbox input[type="checkbox"] { accent-color: var(--brand-primary); width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }

#loginModal .btn {
	width: auto;
	float: right !important;
	background: var(--brand-accent);
	color: var(--white);
	font-family: var(--font-text);
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-bold);
	padding: 0 24px;
	height: var(--control-h);
	line-height: var(--control-h);
	border-radius: var(--radius-sm);
	box-shadow: none;
}
#loginModal .btn:hover { background: var(--brand-accent-hover); box-shadow: var(--shadow-accent); color: var(--white); }
#loginModal .btn:disabled { background: var(--ink-200); cursor: not-allowed; box-shadow: none; }
#loginModal .forgotten_link { margin-top: 0; }
#loginModal .forgotten_link a { color: var(--brand-primary); font-size: var(--fs-caption); font-weight: var(--fw-semibold); }
#loginModal fieldset > .form-group:last-of-type,
#loginModal .forgotten_link { clear: both; }

#loginModal .social-login .btn {
	float: none !important;
	width: 100%;
	background: var(--white);
	color: var(--text-body);
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-sm) !important;
	box-shadow: none;
}
#loginModal .social-login .btn:hover { background: var(--navy-50); box-shadow: none; }
#loginModal .btn-google { background: var(--white); border-color: var(--border-default); color: var(--text-body); }

/* ---- How it Works page ---- */
.page-howitworks .page-section-1 h2 { color: var(--text-strong); }
.page-howitworks .btn { background: var(--brand-accent); border-radius: var(--radius-sm); }
.page-howitworks .page-section-4 a h3 { color: var(--brand-primary); }

/* ---- Charity partner pitch page (forcharities) ---- */
#charities-slides button { background: var(--brand-primary); }
.highlight-latest { background: var(--brand-primary); }
.page-forcharities-index .page-section-4 h4 { color: var(--brand-primary); }

/* ---- Our Cause page (forcharities) ---- */
.page-forcharities-index .page-section-1 h1 { color: var(--text-strong); }
.page-forcharities-index .page-section-3 h2 { color: var(--text-strong); }
.page-forcharities-index .page-section-5 h2 { color: var(--text-strong); }
.page-forcharities-index .page-section-6 ul li i { background: var(--brand-accent); }

/* ---- Footer: navy, not cyan. Group titles are accent orange (SiteFooter.jsx),
   not white; bottom row gets the spec's top border. ---- */
/* Footer — full rebuild to components/layout/SiteFooter.jsx's own markup
   shape (brand+blurb+socials, N link groups, an aside, then a bordered
   bottom bar), replacing the old Bootstrap-column layout entirely.
   jaidee-style.css still has #layout-footer / #footer-social ID rules (bg
   #3fbcf0, link color #5c3586, icon color #fff) that beat any plain class
   selector on specificity alone regardless of source order — every rule
   here is written as "#layout-footer .dl-footer-*" (ID + class) so it wins. */
#layout-footer { background: var(--brand-primary); color: var(--text-on-dark); }
#layout-footer .dl-footer-grid {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: var(--space-11) var(--container-pad) var(--space-7);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--gutter);
}
#layout-footer .dl-footer-brand img { height: 34px; width: auto; display: block; margin-bottom: var(--space-5); }
#layout-footer .dl-footer-blurb { margin: 0 0 var(--space-5); max-width: 34ch; font-size: var(--fs-caption); font-weight: var(--fw-regular); line-height: 1.7; color: var(--text-on-dark-muted); }
#layout-footer .dl-footer-socials { display: flex; gap: 10px; }
#layout-footer .dl-footer-socials a {
	width: 40px; height: 40px; border-radius: var(--radius-circle);
	background: var(--white); color: var(--brand-primary);
	display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
#layout-footer .dl-footer-socials i { color: var(--brand-primary); }
#layout-footer .dl-footer-group-title {
	font-weight: var(--fw-bold); font-size: var(--fs-micro); line-height: 1;
	letter-spacing: var(--ls-wide); text-transform: uppercase;
	color: var(--orange-300); margin-bottom: var(--space-4);
}
#layout-footer .dl-footer-group-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#layout-footer .dl-footer-group-list a { font-weight: var(--fw-semibold); font-size: var(--fs-caption); line-height: 1.4; color: var(--white); text-decoration: none; }
#layout-footer .dl-footer-group-list a:hover { text-decoration: none; color: var(--white); opacity: .85; }
#layout-footer .dl-footer-app-badges { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
#layout-footer .dl-footer-app-badges img { height: 44px; width: auto; display: block; border: 4px solid var(--white); background: var(--ink-900); border-radius: var(--radius-xs); }
#layout-footer .dl-footer-bottom { border-top: var(--border-width) solid var(--border-invert); }
#layout-footer .dl-footer-bottom-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: var(--space-5) var(--container-pad);
	display: flex;
	gap: var(--space-4);
	flex-wrap: wrap;
	align-items: center;
	font-weight: var(--fw-medium);
	font-size: var(--fs-micro);
	line-height: 1.4;
	color: var(--text-on-dark-muted);
}
#layout-footer .dl-footer-bottom-legal { margin-left: auto; }

/* ==========================================================================
   Mobile header (<=767px). The knockout (white) Donaloop logo was rendered on
   a white bar, leaving only the orange check visible. Make the mobile header
   and the mmenu panel title navy, keep the burger/flag legible on it, and
   turn the login strip into a single compact full-width row.
   ========================================================================== */
@media (max-width: 767px) {
	#mobile-header { background: var(--brand-primary); box-shadow: none; position: relative; }
	.mobile-logo { border-bottom: 0; padding: 14px 64px; }
	.mobile-logo img { height: 36px; max-width: 100%; width: auto; }
	#mmenu-link a div { background-color: var(--white); height: 3px; border-radius: 2px; }
	#mmenu-link { padding: 14px 15px; }
	#mobile-header .menu-lang .selected-flag { top: 50%; transform: translateY(-50%); }
	.sticky-header .mobile-logo { padding: 8px 64px; }
	.sticky-header .mobile-logo img { transform: none; height: 30px; }
	.sticky-header #mmenu-link { padding-top: 10px; }

	/* duplicate desktop-only logo in the utility strip */
	.top-jaidee-logo { display: none !important; }
	.header-top-section { padding: 0 !important; }
	.header-top-section .dl-header-login { width: 100%; padding: var(--space-3) var(--space-4); justify-content: center; background: var(--surface-invert, var(--brand-primary)); }
	.header-top-section .dl-header-login .dl-btn { flex: 1 1 auto; max-width: 320px; white-space: normal; text-align: center; }
	.header-top-section .dl-header-search { width: 100%; padding: 0 var(--space-4) var(--space-3); }
	.header-top-section .dl-header-search form { width: 100%; }
	.header-top-section .dl-header-search-input { flex: 1; width: auto; }

	/* mmenu slide-out panel title carries the same white logo */
	.mm-navbar__title, .mm-btn.mm-btn_prev { background: var(--brand-primary); border-bottom: 0; }
	.mm-navbar__title img { width: 160px !important; margin: 16px 0; }
}

/* Mobile language switcher: custom.js moves .menu-lang into #mobile-header.
   Pin it to the right end of the logo bar (same row as burger + logo) and
   open the EN/TH list as a floating card under the flag instead of
   expanding the header (which pushed the flag out of line). */
@media (max-width: 767px) {
	#mobile-header .menu-lang { position: absolute; top: 0; bottom: 0; right: 0; width: auto; padding: 0 15px !important; margin: 0; display: flex; align-items: center; z-index: 10; }
	#mobile-header .menu-lang .selected-flag { position: static; transform: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 32px; border-radius: var(--radius-xs); cursor: pointer; transition: background-color var(--dur-base, .2s); }
	#mobile-header .menu-lang .selected-flag:active { background: rgba(255,255,255,.18); }
	#mobile-header .menu-lang .selected-flag img { width: 26px; height: 18px; object-fit: cover; border-radius: 2px; outline: none !important; }
	#mobile-header .menu-lang ul {
		position: absolute; top: calc(100% - 6px); right: 12px; min-width: 150px;
		margin: 0; padding: 6px; list-style: none; text-align: left;
		background: var(--white); border: 0; border-radius: var(--radius-md);
		box-shadow: 0 8px 24px rgba(10,30,70,.22);
	}
	#mobile-header .menu-lang ul::before { content: ""; position: absolute; top: -6px; right: 20px; width: 12px; height: 12px; background: var(--white); transform: rotate(45deg); border-radius: 2px; }
	#mobile-header .menu-lang ul li { display: block; margin: 0; }
	#mobile-header .menu-lang ul li a.layout_select_lang { display: flex; width: 100%; gap: 10px; padding: 10px 12px; font-size: var(--fs-body-sm); color: var(--text-body); opacity: 1; border: 1px solid transparent; border-radius: var(--radius-sm); }
	#mobile-header .menu-lang ul li a.layout_select_lang img { width: 24px; height: 16px; outline: none !important; }
	#mobile-header .menu-lang ul li a.layout_select_lang.active { background: var(--navy-50); color: var(--brand-primary); border-color: transparent; }
	#mobile-header .menu-lang ul li a.layout_select_lang.active::after { content: "\f00c"; font-family: FontAwesome; margin-left: auto; color: var(--brand-accent); }
}

/* Align the flag (and burger) with the logo row: the flag's container used to
   stretch over the whole header incl. the empty member/search block below the
   logo, so it centered too low. Give the logo row a fixed height and pin both
   controls to exactly that row. */
@media (max-width: 767px) {
	.mobile-logo { display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 64px; }
	.mobile-logo a { display: flex; align-items: center; }
	.sticky-header .mobile-logo { height: 48px; padding: 0 64px; }
	#mobile-header .menu-lang { bottom: auto; height: 64px; }
	.sticky-header#mobile-header .menu-lang, .sticky-header .menu-lang { height: 48px; }
	#mmenu-link { top: 0; height: 64px; display: flex; flex-direction: column; justify-content: center; padding-top: 0 !important; padding-bottom: 0; }
	#mmenu-link a div { margin: 3px 0; }
	.sticky-header #mmenu-link { height: 48px; padding-top: 0 !important; }
}

/* Empty .mobile-member-search (its member/search <li>s are not used in the new
   header) still carried 15px/7px padding, adding a gap under the logo row. */
@media (max-width: 767px) {
	.mobile-member-search:not(:has(li)) { display: none; }
	.mobile-member-search { padding: 0 var(--space-4) var(--space-3); }
}

/* :has(li) didn't help — custom.js moves the (display:none) search <li> and the
   member <li> into .mobile-member-search, so it is never "empty". The new
   mobile header has its own login button, so the block is not needed at all. */
@media (max-width: 767px) {
	.mobile-member-search { display: none !important; }
}

/* Mobile: login/signup (or account/logout) moves from the header bar into the
   slide-out menu (<li class="nav-li-mobile-auth"> in main-menu.blade.php). */
.nav-li-mobile-auth { display: none !important; }
@media (max-width: 767px) {
	.header-top-section .dl-header-login { display: none !important; }
	.mm-listitem.nav-li-mobile-auth { display: block !important; }
	.mm-listitem.nav-li-mobile-auth--cta { padding: var(--space-4); border-bottom: 0; }
	.mm-listitem.nav-li-mobile-auth--cta::after { display: none; }
	.mm-listitem.nav-li-mobile-auth--cta > a.nav-link,
	.mm-listitem.nav-li-mobile-auth--cta > .mm-listitem__text {
		display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px;
		background: var(--brand-accent); color: var(--text-on-accent) !important; border-radius: var(--radius-sm);
		font-weight: var(--fw-bold); font-size: var(--fs-body-sm); text-transform: uppercase; letter-spacing: var(--ls-label);
	}
}

/* Mobile footer bottom bar: center copyright + legal line (stacked), and leave
   room below so the floating back-to-top button doesn't cover the text. */
@media (max-width: 767px) {
	#layout-footer .dl-footer-bottom-inner { flex-direction: column; justify-content: center; text-align: center; gap: var(--space-2); padding-bottom: 72px; }
	#layout-footer .dl-footer-bottom-legal { margin-left: 0; }
}

/* Mobile footer top spacing: legacy #layout-footer padding (30px) stacked on the
   grid's desktop 80px top padding. Drop the legacy one and tighten the grid. */
@media (max-width: 767px) {
	#layout-footer { padding: 0; }
	#layout-footer .dl-footer-grid { padding-top: var(--space-8); padding-bottom: var(--space-5); gap: var(--space-6); }
}

/* Mobile footer: brand block full width, link groups in 2 columns
   (Shop | About, Join | Legal), app badges side by side underneath. */
@media (max-width: 767px) {
	#layout-footer .dl-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: var(--space-6); }
	#layout-footer .dl-footer-brand,
	#layout-footer .dl-footer-aside { grid-column: 1 / -1; }
	#layout-footer .dl-footer-blurb { max-width: none; }
	#layout-footer .dl-footer-group-list { gap: var(--space-3); }
	#layout-footer .dl-footer-app-badges { flex-direction: row; flex-wrap: wrap; gap: var(--space-3); }
	#layout-footer .dl-footer-app-badges img { height: 40px; }
}
@media (max-width: 767px) {
	.mm-navbar__title img.main-logo { cursor: pointer; }
}
