/* =====================================================================
   MVPoll UI — lagoon design layer
   Loaded after tailwind / theme.css on every public and user page.
   Re-skins the existing markup to match the new landing page.
   Selectors are prefixed with "html body" so they win over the
   Tailwind CDN styles that are injected at runtime.
   ===================================================================== */

:root {
    --mv-deep: #032B3A;
    --mv-deeper: #021F2A;
    --mv-ocean: #0A5C7A;
    --mv-lagoon: #16B6B0;
    --mv-lagoon-d: #0E8C88;
    --mv-shallow: #9BEBDD;
    --mv-sand: #F7EFDF;
    --mv-sun: #FFD23F;
    --mv-mist: #F1F7F6;
    --mv-line: #D5E7E3;
    --mv-muted: #4E6B72;
    --mv-display: 'Unbounded', system-ui, sans-serif;
    --mv-body: 'Manrope', system-ui, sans-serif;

    /* Re-point the old theme.css tokens so anything using them follows */
    --primary-600: #0E8C88;
    --primary-700: #032B3A;
    --primary-800: #032B3A;
    --primary-900: #021F2A;
    --bg-primary: #F1F7F6;
    --bg-secondary: #E4F0ED;
    --text-primary: #032B3A;
    --text-secondary: #4E6B72;
    --border-light: #D5E7E3;
    --border-medium: #C3DAD5;
    --accent-dark: #16B6B0;
    --btn-primary-bg: #032B3A;
    --btn-primary-hover: #0A5C7A;
    --btn-primary-text: #FFFFFF;
}

/* ---------- Base type ---------- */
html body {
    font-family: var(--mv-body) !important;
    color: var(--mv-deep);
    -webkit-font-smoothing: antialiased;
}
html body h1,
html body h2 {
    font-family: var(--mv-display);
    letter-spacing: -0.03em;
    line-height: 1.12;
}
html body h1 { font-weight: 800; }
html body h2 { font-weight: 700; }
html body h3, html body h4 { font-family: var(--mv-body); font-weight: 800; letter-spacing: -0.01em; }
html body .font-black { font-weight: 800; }
html body.rtl-language, html body.rtl-language h1, html body.rtl-language h2 { font-family: 'Faruma', var(--mv-body) !important; }

/* ---------- Page backgrounds ---------- */
html body.bg-gray-50, html body.bg-primary, html body.bg-gray-100 { background-color: var(--mv-mist) !important; }

/* ---------- Brand mark: replace the vote-box icon with the tick logo ---------- */
html body .fa-vote-yea {
    display: inline-block;
    width: 32px; height: 32px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='2' y='2' width='28' height='28' rx='8' fill='%23FFD23F'/%3E%3Cpath d='M9 16.5l4.5 4.5L23 11' fill='none' stroke='%23032B3A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
    vertical-align: middle;
}
html body .fa-vote-yea::before { content: none; }

/* ---------- Top navigation (public + user pages) ---------- */
html body:not(.admin-page) > nav,
html body:not(.admin-page) nav.bg-card,
html body:not(.admin-page) nav.bg-white {
    background: var(--mv-deep) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.08) !important;
    border: 0 !important;
}
html body > nav .text-xl.font-bold,
html body > nav span.font-bold { font-family: var(--mv-display); font-weight: 700; color: #fff !important; letter-spacing: -0.02em; }
html body > nav a,
html body > nav button:not(.btn-primary),
html body > nav .text-gray-600,
html body > nav .text-gray-700,
html body > nav .text-gray-900 { color: rgba(255,255,255,.85) !important; }
html body > nav a:hover,
html body > nav button:not(.btn-primary):hover { color: #fff !important; }
/* the current page link on user pages */
html body > nav a.text-\[\#E9DAC9\],
html body > nav a.font-semibold.text-\[\#E9DAC9\] { color: var(--mv-sun) !important; }
html body > nav .border-gray-200,
html body > nav .border-gray-300 { border-color: rgba(255,255,255,.35) !important; }
html body > nav .hover\:bg-gray-100:hover { background: rgba(255,255,255,.08) !important; }
html body > nav .bg-gray-100 { background: rgba(255,255,255,.1) !important; }
/* Primary CTA in the nav is yellow */
html body > nav .btn-primary,
html body > nav a.bg-\[\#7A6F63\] {
    background: var(--mv-sun) !important;
    color: var(--mv-deep) !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #C9A000;
    border-radius: 11px !important;
}
html body > nav .btn-primary:hover,
html body > nav a.bg-\[\#7A6F63\]:hover { background: #FFDC66 !important; }
/* Mobile dropdowns become part of the dark bar */
html body #mobile-menu,
html body #nav-mobile-menu {
    background: var(--mv-deep) !important;
    border-color: rgba(255,255,255,.1) !important;
}
html body #mobile-menu .text-red-600,
html body #nav-mobile-menu .text-red-600 { color: #FF9A92 !important; }
html body > nav .hover\:text-red-600:hover { color: #FF9A92 !important; }

/* ---------- Hero bands on content pages ---------- */
html body .gradient-bg {
    background-color: var(--mv-deep) !important;
    background-image:
        radial-gradient(closest-side, transparent 72%, rgba(155,235,221,.16) 73%, rgba(155,235,221,.16) 82%, transparent 83%),
        radial-gradient(60% 90% at 85% 40%, rgba(22,182,176,.45), transparent 70%),
        radial-gradient(40% 60% at 5% 100%, rgba(10,92,122,.7), transparent 70%) !important;
    background-size: 640px 420px, 100% 100%, 100% 100% !important;
    background-position: right -160px center, center, center !important;
    background-repeat: no-repeat !important;
    position: relative;
}
html body .gradient-bg h1 { color: #fff; }
html body .gradient-bg p { color: rgba(255,255,255,.86) !important; }

/* Gradient welcome panels (dashboard etc.) */
html body .from-\[\#E9DAC9\],
html body .from-\[\#5F564D\],
html body .from-purple-600 {
    --tw-gradient-from: #0A5C7A var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(10 92 122 / 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html body .to-\[\#5F564D\],
html body .to-\[\#3b2a1f\],
html body .to-purple-800 { --tw-gradient-to: #032B3A var(--tw-gradient-to-position) !important; }

/* ---------- Buttons & brand fills ---------- */
html body .btn-primary,
html body .bg-\[\#E9DAC9\],
html body .bg-\[\#5F564D\],
html body .bg-\[\#7A6F63\],
html body .bg-purple-600,
html body .bg-amber-600 {
    background-color: var(--mv-deep) !important;
    color: #fff !important;
}
html body .btn-primary:hover,
html body .hover\:bg-\[\#5F564D\]:hover,
html body .hover\:bg-\[\#E9DAC9\]:hover,
html body .hover\:bg-purple-700:hover,
html body .hover\:bg-amber-700:hover {
    background-color: var(--mv-ocean) !important;
    color: #fff !important;
}
html body button.btn-primary,
html body a.btn-primary,
html body button.bg-\[\#E9DAC9\],
html body a.bg-\[\#E9DAC9\],
html body button.bg-purple-600,
html body a.bg-purple-600,
html body button.bg-amber-600,
html body a.bg-amber-600 {
    border-radius: 12px !important;
    font-weight: 800 !important;
}
html body .bg-\[\#8E8E8E\] { background-color: var(--mv-muted) !important; }
/* Icon circles that used the old accent */
html body div.bg-\[\#E9DAC9\].rounded-full,
html body div.bg-amber-600.rounded-full,
html body span.bg-purple-600.rounded-full { background-color: var(--mv-lagoon-d) !important; }
/* Soft tints */
html body .bg-purple-100, html body .bg-amber-100 { background-color: #DDF6F1 !important; }
html body .bg-purple-50, html body .bg-amber-50 { background-color: var(--mv-mist) !important; }

/* ---------- Accent text ---------- */
html body .text-\[\#E9DAC9\],
html body .text-purple-600,
html body .text-purple-700,
html body .text-amber-600,
html body .text-amber-700 { color: var(--mv-lagoon-d) !important; }
html body .hover\:text-\[\#E9DAC9\]:hover,
html body .hover\:text-amber-600:hover,
html body .hover\:text-purple-600:hover { color: var(--mv-lagoon-d) !important; }
html body .gradient-bg .text-\[\#E9DAC9\],
html body .bg-gray-900 .text-\[\#E9DAC9\] { color: var(--mv-shallow) !important; }
html body .border-\[\#E9DAC9\],
html body .border-purple-600,
html body .border-amber-600 { border-color: var(--mv-lagoon) !important; }
html body .text-gray-900 { color: var(--mv-deep); }
html body .text-gray-600, html body .text-gray-500 { color: var(--mv-muted); }

/* Links in running text */
html body:not(.admin-page) main a:not([class]),
html body:not(.admin-page) section p a:not([class]) { color: var(--mv-lagoon-d); font-weight: 700; text-decoration: underline; text-decoration-color: var(--mv-shallow); text-underline-offset: 3px; }

/* ---------- Cards ---------- */
html body .bg-white.rounded-xl,
html body .bg-white.rounded-2xl,
html body .bg-card.rounded-lg,
html body .bg-white.rounded-lg.shadow,
html body .bg-white.rounded-lg.shadow-md,
html body .bg-white.rounded-lg.shadow-lg {
    border-radius: 20px !important;
    border: 1px solid var(--mv-line);
}
html body .shadow-lg:not(nav):not(.modal-box) { box-shadow: 0 24px 48px -32px rgba(3,43,58,.35) !important; }
html body .shadow-md { box-shadow: 0 16px 32px -24px rgba(3,43,58,.3) !important; }

/* ---------- Forms ---------- */
html body input:not([type=checkbox]):not([type=radio]),
html body select,
html body textarea {
    border-radius: 12px !important;
    border-width: 2px !important;
    border-color: var(--mv-line) !important;
    font-family: var(--mv-body);
}
html body input:focus, html body select:focus, html body textarea:focus {
    border-color: var(--mv-lagoon) !important;
    box-shadow: 0 0 0 4px rgba(22,182,176,.18) !important;
    outline: none !important;
}
html body .focus\:ring-purple-600:focus,
html body .focus\:ring-\[\#E9DAC9\]:focus { --tw-ring-color: rgba(22,182,176,.45) !important; }
html body input[type=checkbox], html body input[type=radio] { accent-color: var(--mv-lagoon-d); }

/* ---------- Status badges ---------- */
html body .bg-green-100 { background-color: #DDF6F1 !important; }
html body .text-green-800 { color: #0A6268 !important; }

/* ---------- Progress bars ---------- */
html body .bg-yellow-400 { background-color: var(--mv-sun) !important; }

/* ---------- Footer ---------- */
html body footer,
html body footer.bg-gray-900 {
    background: var(--mv-deeper) !important;
    color: rgba(255,255,255,.72) !important;
}
html body footer h4 { color: #fff !important; }
html body footer a { color: rgba(255,255,255,.72) !important; }
html body footer a:hover { color: #fff !important; }
html body footer .border-gray-700 { border-color: rgba(255,255,255,.1) !important; }

/* ---------- Modals ---------- */
html body .modal-box { border-radius: 26px !important; }
html body .modal-overlay { background: rgba(2,31,42,.75) !important; }

/* ---------- Focus ---------- */
html body a:focus-visible, html body button:focus-visible { outline: 3px solid var(--mv-sun); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    html body * { transition-duration: .001s !important; animation-duration: .001s !important; }
}

/* ---------- Language switcher (injected by i18n.js) ---------- */
html body .mvpoll-language-switcher select {
    background-color: transparent !important;
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,.35) !important;
    border-radius: 10px !important;
    padding: .45rem .7rem !important;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
}
html body .mvpoll-language-switcher select option { color: #032B3A; background: #fff; }
html body .mvpoll-language-switcher label { color: rgba(255,255,255,.7) !important; }
html body #mobile-menu .mvpoll-language-switcher { border-color: rgba(255,255,255,.1) !important; }

/* ---------- Referral / achievement panels ---------- */
html body .from-green-500 {
    --tw-gradient-from: #0E8C88 var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgb(14 140 136 / 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html body .to-emerald-600, html body .to-green-700, html body .to-green-600 { --tw-gradient-to: #0A5C7A var(--tw-gradient-to-position) !important; }

/* Footer brand */
html body footer .font-bold, html body footer span.text-xl { color: #fff !important; font-family: var(--mv-display); }

/* eFaas switch: config.js.php adds html.efaas-off when eFaas is turned off */
html.efaas-off [data-efaas] { display: none !important; }
html:not(.efaas-off) [data-efaas-off] { display: none !important; }
