/* ==========================================================================
   Seasonal themes – applied through <html data-season="…">.
   Each skin overrides the brand tokens so the whole app (sidebar, tab bar,
   hero cards, buttons, login) follows the occasion, plus optional decorative
   effects rendered by footer.php in .season-fx (pure CSS, transform-only).
   ========================================================================== */

/* ---------- Greeting banner ---------- */
.season-banner {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px; padding: 12px 16px; border-radius: 18px;
  background: var(--brand-gradient); color: #fff; overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
  animation: bannerIn .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes bannerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.season-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 120px at 85% 50%, rgba(255,255,255,.22), transparent 70%); pointer-events: none; }
.season-banner .season-icon { position: relative; width: 40px; height: 40px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: rgba(255,255,255,.18); font-size: 1.05rem; }
.season-banner .season-text { position: relative; min-width: 0; flex: 1; line-height: 1.3; }
.season-banner .season-text strong { display: block; font-size: .95rem; font-weight: 800; }
.season-banner .season-text span { font-size: .84rem; opacity: .92; }
.season-banner .season-close { position: relative; border: 0; background: rgba(255,255,255,.16); color: #fff; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.season-banner .season-close:hover { background: rgba(255,255,255,.28); }
.season-banner.is-preview .season-text span::after { content: " (preview)"; opacity: .8; }

/* ---------- Decorative layer ---------- */
.season-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.season-fx i { position: absolute; top: -8vh; left: var(--x, 50%); font-style: normal; font-size: var(--s, 16px); opacity: 0; will-change: transform; animation: fall var(--t, 14s) linear infinite; animation-delay: var(--d, 0s); }
@keyframes fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: .9; }
  92%  { opacity: .9; }
  100% { transform: translate3d(calc(var(--drift, 30px)), 112vh, 0) rotate(var(--rot, 360deg)); opacity: 0; }
}
.season-fx i:nth-child(1)  { --x: 4%;  --d: 0s;    --t: 13s; --s: 14px; --drift: 40px; }
.season-fx i:nth-child(2)  { --x: 11%; --d: -3s;   --t: 17s; --s: 20px; --drift: -30px; }
.season-fx i:nth-child(3)  { --x: 18%; --d: -7s;   --t: 15s; --s: 12px; --drift: 20px; }
.season-fx i:nth-child(4)  { --x: 25%; --d: -1s;   --t: 19s; --s: 18px; --drift: -50px; }
.season-fx i:nth-child(5)  { --x: 32%; --d: -9s;   --t: 14s; --s: 15px; --drift: 35px; }
.season-fx i:nth-child(6)  { --x: 39%; --d: -5s;   --t: 18s; --s: 22px; --drift: -20px; }
.season-fx i:nth-child(7)  { --x: 46%; --d: -11s;  --t: 16s; --s: 13px; --drift: 45px; }
.season-fx i:nth-child(8)  { --x: 53%; --d: -2s;   --t: 20s; --s: 17px; --drift: -40px; }
.season-fx i:nth-child(9)  { --x: 60%; --d: -8s;   --t: 13s; --s: 19px; --drift: 25px; }
.season-fx i:nth-child(10) { --x: 67%; --d: -4s;   --t: 17s; --s: 12px; --drift: -35px; }
.season-fx i:nth-child(11) { --x: 74%; --d: -12s;  --t: 15s; --s: 21px; --drift: 30px; }
.season-fx i:nth-child(12) { --x: 81%; --d: -6s;   --t: 19s; --s: 14px; --drift: -25px; }
.season-fx i:nth-child(13) { --x: 88%; --d: -10s;  --t: 14s; --s: 16px; --drift: 50px; }
.season-fx i:nth-child(14) { --x: 95%; --d: -13s;  --t: 18s; --s: 18px; --drift: -45px; }
.season-fx i:nth-child(15) { --x: 8%;  --d: -15s;  --t: 21s; --s: 11px; --drift: 15px; }
.season-fx i:nth-child(16) { --x: 36%; --d: -16s;  --t: 16s; --s: 23px; --drift: -15px; }
.season-fx i:nth-child(17) { --x: 64%; --d: -14s;  --t: 22s; --s: 13px; --drift: 55px; }
.season-fx i:nth-child(18) { --x: 92%; --d: -17s;  --t: 15s; --s: 17px; --drift: -55px; }
@media (max-width: 767.98px) { .season-fx i:nth-child(n+13) { display: none; } }
@media (prefers-reduced-motion: reduce) { .season-fx { display: none; } }

/* Fixed corner ornament (crescent etc.) */
.season-ornament { position: fixed; z-index: 0; pointer-events: none; opacity: .18; }

/* =========================================================
   UAE National Day / Flag Day – red, green, black, white
   ========================================================= */
[data-season="uae_national_day"], [data-season="flag_day"] {
  --brand-1: #00732f; --brand-2: #c8102e;
  --brand-gradient: linear-gradient(135deg, #00732f 0%, #0a8a3a 45%, #c8102e 100%);
  --primary-start: #00732f; --primary-end: #c8102e;
  --primary-soft: rgba(0, 115, 47, .12); --primary-text: #00732f;
  --shadow-primary: 0 14px 30px rgba(0, 115, 47, .22);
  --app-bg-image:
    radial-gradient(1000px 500px at 0% -10%, rgba(0, 115, 47, .12), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(200, 16, 46, .10), transparent 55%);
}
[data-season="uae_national_day"][data-theme="dark"], [data-season="flag_day"][data-theme="dark"] { --primary-text: #6ee7a0; --primary-soft: rgba(0, 115, 47, .25); }
[data-season="uae_national_day"] .hero-card, [data-season="flag_day"] .hero-card { background: linear-gradient(135deg, #00602a 0%, #00843a 48%, #b50f29 100%); }
[data-season="uae_national_day"] .hero-card::after, [data-season="flag_day"] .hero-card::after {
  width: 230px; height: 170px; left: auto; right: -30px; bottom: -40px; border-radius: 24px; transform: rotate(-14deg); opacity: .9;
  background: linear-gradient(180deg, #00732f 0 33.3%, #ffffff 33.3% 66.6%, #111 66.6% 100%);
  box-shadow: inset 70px 0 0 #c8102e, 0 20px 40px rgba(0,0,0,.25);
}
[data-season="uae_national_day"] .season-fx i::before, [data-season="flag_day"] .season-fx i::before { content: ""; display: block; width: 10px; height: 16px; border-radius: 3px; }
[data-season="uae_national_day"] .season-fx i:nth-child(4n+1)::before, [data-season="flag_day"] .season-fx i:nth-child(4n+1)::before { background: #00732f; }
[data-season="uae_national_day"] .season-fx i:nth-child(4n+2)::before, [data-season="flag_day"] .season-fx i:nth-child(4n+2)::before { background: #c8102e; }
[data-season="uae_national_day"] .season-fx i:nth-child(4n+3)::before, [data-season="flag_day"] .season-fx i:nth-child(4n+3)::before { background: #ffffff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
[data-season="uae_national_day"] .season-fx i:nth-child(4n+4)::before, [data-season="flag_day"] .season-fx i:nth-child(4n+4)::before { background: #1f2937; }
[data-season="uae_national_day"] .season-banner, [data-season="flag_day"] .season-banner { background: linear-gradient(90deg, #00732f 0%, #00732f 30%, #c8102e 100%); }

/* =========================================================
   Commemoration Day – respectful, muted bronze
   ========================================================= */
[data-season="commemoration_day"] {
  --brand-1: #4b5563; --brand-2: #8d6e63;
  --brand-gradient: linear-gradient(135deg, #374151, #6b4f3f);
  --primary-start: #374151; --primary-end: #8d6e63;
  --primary-soft: rgba(141, 110, 99, .14); --primary-text: #6b4f3f;
  --shadow-primary: 0 14px 30px rgba(75, 85, 99, .2);
}
[data-season="commemoration_day"][data-theme="dark"] { --primary-text: #d6bfae; }
[data-season="commemoration_day"] .hero-card { background: linear-gradient(135deg, #2f3542 0%, #4b5563 50%, #6b4f3f 100%); }
[data-season="commemoration_day"] .season-banner { background: linear-gradient(90deg, #374151, #6b4f3f); }

/* =========================================================
   Ramadan – deep night blue/purple with gold
   ========================================================= */
[data-season="ramadan"] {
  --brand-1: #3b2a8a; --brand-2: #7c3aed;
  --brand-gradient: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 60%, #b7791f 100%);
  --primary-start: #312e81; --primary-end: #6d28d9;
  --primary-soft: rgba(124, 58, 237, .13); --primary-text: #5b21b6;
  --shadow-primary: 0 14px 30px rgba(76, 29, 149, .25);
  --app-bg-image:
    radial-gradient(1000px 500px at 10% -10%, rgba(76, 29, 149, .16), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(245, 196, 81, .12), transparent 55%);
}
[data-season="ramadan"][data-theme="dark"] { --primary-text: #d8b4fe; --app-bg: #0a0b1e; }
[data-season="ramadan"] .hero-card { background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #7c3aed 100%); }
[data-season="ramadan"] .hero-card::before { background: radial-gradient(circle at 35% 35%, transparent 54%, #f5c451 56%, #f5c451 100%); opacity: .9; width: 150px; height: 150px; top: -40px; right: 30px; box-shadow: 0 0 40px rgba(245,196,81,.35); }
[data-season="ramadan"] .hero-card::after { background: rgba(245, 196, 81, .12); }
[data-season="ramadan"] .season-fx i::before { content: "\2726"; color: #f5c451; text-shadow: 0 0 10px rgba(245, 196, 81, .7); }
[data-season="ramadan"] .season-fx i:nth-child(3n)::before { content: "\2727"; color: #fde68a; }
[data-season="ramadan"] .season-fx i { animation-name: twinkleFall; }
@keyframes twinkleFall {
  0%   { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  10%  { opacity: .95; }
  50%  { transform: translate3d(calc(var(--drift, 30px) / 2), 56vh, 0) scale(1.15); }
  90%  { opacity: .9; }
  100% { transform: translate3d(var(--drift, 30px), 112vh, 0) scale(.7); opacity: 0; }
}
[data-season="ramadan"] .season-ornament { top: 90px; right: 28px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 36% 40%, transparent 56%, #f5c451 58%); filter: drop-shadow(0 0 20px rgba(245,196,81,.6)); opacity: .22; }
[data-season="ramadan"] .season-banner { background: linear-gradient(90deg, #1e1b4b, #4c1d95 60%, #9a6b1f); }
[data-season="ramadan"] .season-banner .season-icon { color: #f5c451; }

/* =========================================================
   Eid – emerald & gold celebration
   ========================================================= */
[data-season="eid"] {
  --brand-1: #047857; --brand-2: #059669;
  --brand-gradient: linear-gradient(135deg, #065f46 0%, #059669 55%, #c9a227 100%);
  --primary-start: #065f46; --primary-end: #10b981;
  --primary-soft: rgba(5, 150, 105, .13); --primary-text: #047857;
  --shadow-primary: 0 14px 30px rgba(5, 150, 105, .25);
  --app-bg-image:
    radial-gradient(1000px 500px at 10% -10%, rgba(5, 150, 105, .14), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(201, 162, 39, .14), transparent 55%);
}
[data-season="eid"][data-theme="dark"] { --primary-text: #6ee7b7; }
[data-season="eid"] .hero-card { background: linear-gradient(135deg, #064e3b 0%, #059669 60%, #b58b1c 100%); }
[data-season="eid"] .hero-card::before { background: radial-gradient(circle at 35% 35%, transparent 54%, #fde68a 56%); opacity: .85; width: 130px; height: 130px; top: -30px; right: 40px; }
[data-season="eid"] .season-fx i::before { content: "\2726"; color: #fde68a; text-shadow: 0 0 10px rgba(253, 230, 138, .8); }
[data-season="eid"] .season-fx i:nth-child(2n)::before { content: "\25CF"; color: #fff; font-size: .5em; }
[data-season="eid"] .season-fx i:nth-child(5n)::before { content: "\2605"; color: #c9a227; }
[data-season="eid"] .season-banner { background: linear-gradient(90deg, #065f46, #059669 60%, #b58b1c); }
[data-season="eid"] .season-banner .season-icon { color: #fde68a; }

/* =========================================================
   Islamic New Year – calm teal & gold
   ========================================================= */
[data-season="islamic_new_year"] {
  --brand-1: #0f766e; --brand-2: #115e59;
  --brand-gradient: linear-gradient(135deg, #134e4a 0%, #0f766e 60%, #b58b1c 100%);
  --primary-start: #134e4a; --primary-end: #14b8a6;
  --primary-soft: rgba(15, 118, 110, .13); --primary-text: #0f766e;
  --shadow-primary: 0 14px 30px rgba(15, 118, 110, .25);
}
[data-season="islamic_new_year"][data-theme="dark"] { --primary-text: #5eead4; }
[data-season="islamic_new_year"] .hero-card { background: linear-gradient(135deg, #134e4a 0%, #0f766e 60%, #b58b1c 100%); }
[data-season="islamic_new_year"] .hero-card::before { background: radial-gradient(circle at 35% 35%, transparent 54%, #fde68a 56%); opacity: .8; width: 120px; height: 120px; top: -26px; right: 40px; }
[data-season="islamic_new_year"] .season-fx i::before { content: "\2727"; color: #fde68a; }
[data-season="islamic_new_year"] .season-banner { background: linear-gradient(90deg, #134e4a, #0f766e 60%, #b58b1c); }

/* =========================================================
   Winter – icy blue with snow
   ========================================================= */
[data-season="winter"] {
  --brand-1: #0284c7; --brand-2: #2563eb;
  --brand-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 60%, #4f46e5 100%);
  --primary-start: #0284c7; --primary-end: #2563eb;
  --primary-soft: rgba(14, 165, 233, .13); --primary-text: #0369a1;
  --shadow-primary: 0 14px 30px rgba(37, 99, 235, .25);
  --app-bg: #eef5fb;
  --app-bg-image:
    radial-gradient(1000px 500px at 10% -10%, rgba(14, 165, 233, .16), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(99, 102, 241, .12), transparent 55%);
}
[data-season="winter"][data-theme="dark"] { --primary-text: #7dd3fc; --app-bg: #081426; }
[data-season="winter"] .hero-card { background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 50%, #4f46e5 100%); }
[data-season="winter"] .hero-card::before, [data-season="winter"] .hero-card::after { background: rgba(255, 255, 255, .16); }
[data-season="winter"] .season-fx i::before { content: "\2744"; color: #fff; text-shadow: 0 0 6px rgba(14, 165, 233, .45), 0 0 1px rgba(2, 132, 199, .6); }
[data-season="winter"] .season-fx i:nth-child(3n)::before { content: "\2745"; }
[data-season="winter"] .season-fx i:nth-child(4n)::before { content: "\2746"; }
[data-season="winter"][data-theme="light"] .season-fx i::before { color: #bae6fd; text-shadow: 0 0 1px #0284c7; }
[data-season="winter"] .season-banner { background: linear-gradient(90deg, #0369a1, #0ea5e9 60%, #4f46e5); }

/* =========================================================
   New Year – midnight & gold sparkles
   ========================================================= */
[data-season="new_year"] {
  --brand-1: #4338ca; --brand-2: #c026d3;
  --brand-gradient: linear-gradient(135deg, #111827 0%, #4338ca 55%, #c026d3 100%);
  --primary-start: #312e81; --primary-end: #a21caf;
  --primary-soft: rgba(67, 56, 202, .13); --primary-text: #4338ca;
  --shadow-primary: 0 14px 30px rgba(67, 56, 202, .25);
}
[data-season="new_year"][data-theme="dark"] { --primary-text: #c4b5fd; }
[data-season="new_year"] .hero-card { background: linear-gradient(135deg, #111827 0%, #4338ca 55%, #c026d3 100%); }
[data-season="new_year"] .season-fx i::before { content: "\2726"; color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, .8); }
[data-season="new_year"] .season-fx i:nth-child(2n)::before { color: #f472b6; }
[data-season="new_year"] .season-fx i:nth-child(3n)::before { content: "\25CF"; color: #a5b4fc; font-size: .55em; }
[data-season="new_year"] .season-fx i { animation-name: twinkleFall; }
[data-season="new_year"] .season-banner { background: linear-gradient(90deg, #111827, #4338ca 55%, #c026d3); }

/* =========================================================
   Summer – warm orange & sand
   ========================================================= */
[data-season="summer"] {
  --brand-1: #ea580c; --brand-2: #f59e0b;
  --brand-gradient: linear-gradient(135deg, #ea580c 0%, #f59e0b 60%, #fbbf24 100%);
  --primary-start: #ea580c; --primary-end: #f59e0b;
  --primary-soft: rgba(249, 115, 22, .13); --primary-text: #c2410c;
  --shadow-primary: 0 14px 30px rgba(234, 88, 12, .25);
  --app-bg: #fff8f1;
}
[data-season="summer"][data-theme="dark"] { --primary-text: #fdba74; --app-bg: #1a1208; }
[data-season="summer"] .hero-card { background: linear-gradient(135deg, #c2410c 0%, #f97316 55%, #fbbf24 100%); }
[data-season="summer"] .season-banner { background: linear-gradient(90deg, #c2410c, #f97316 60%, #f59e0b); }

/* ---------- Login page hooks (index.php uses its own palette) ---------- */
[data-season] .login-logo, [data-season] .brand-icon, [data-season] .mobile-brand-icon, [data-season] .btn-login { background: var(--brand-gradient); }
[data-season="uae_national_day"] body.login-body, [data-season="flag_day"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(0,115,47,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(200,16,46,.35), transparent 60%), linear-gradient(135deg, #061a10 0%, #0b1020 50%, #2a0a12 100%); }
[data-season="ramadan"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(76,29,149,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(245,196,81,.22), transparent 60%), linear-gradient(135deg, #07061a 0%, #1e1b4b 60%, #2e1065 100%); }
[data-season="eid"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(5,150,105,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(201,162,39,.25), transparent 60%), linear-gradient(135deg, #03140f 0%, #064e3b 60%, #0f172a 100%); }
[data-season="winter"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(14,165,233,.4), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(99,102,241,.3), transparent 60%), linear-gradient(135deg, #061225 0%, #0c2340 55%, #1e1b4b 100%); }
[data-season="new_year"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(67,56,202,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(192,38,211,.3), transparent 60%), linear-gradient(135deg, #05060f 0%, #111827 50%, #2e1065 100%); }
[data-season="islamic_new_year"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(15,118,110,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(201,162,39,.22), transparent 60%), linear-gradient(135deg, #04110f 0%, #134e4a 60%, #0f172a 100%); }
[data-season="summer"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(249,115,22,.45), transparent 60%), radial-gradient(800px 600px at 85% 0%, rgba(245,158,11,.3), transparent 60%), linear-gradient(135deg, #1a0d05 0%, #2b1608 55%, #0f172a 100%); }
[data-season="commemoration_day"] body.login-body { background: radial-gradient(900px 600px at 15% 10%, rgba(107,79,63,.5), transparent 60%), linear-gradient(135deg, #0f1115 0%, #1f2937 55%, #3b2a22 100%); }

/* seasonal effects render behind the app content */
.app-shell { position: relative; z-index: 1; }
.login-page { z-index: 2; }
