/* calendar.css — flagship calendar/converter styles + the maghrib-sky hero
   that all tabs share (this file is linked globally). */

/* ── hero: the maghrib sky, with the crescent as signature ── */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 24px var(--sp) 22px; margin-bottom: var(--sp);
  color: var(--hero-ink);
  background:
    radial-gradient(120% 140% at 82% 4%, var(--mgb-halo), transparent 46%),
    radial-gradient(150% 120% at 50% 130%, var(--mgb-glow), transparent 58%),
    linear-gradient(168deg, var(--mgb-1) 0%, var(--mgb-2) 52%, var(--mgb-3) 100%);
  box-shadow: var(--shadow);
}
.hero::after {                 /* crescent, low in the west */
  content: ''; position: absolute; right: 16px; top: 16px; width: 52px; height: 52px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2064%2064%27%3E%3Cdefs%3E%3Cmask%20id%3D%27m%27%3E%3Crect%20width%3D%2764%27%20height%3D%2764%27%20fill%3D%27white%27%2F%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%2726%27%20r%3D%2722%27%20fill%3D%27black%27%2F%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2730%27%20cy%3D%2732%27%20r%3D%2724%27%20fill%3D%27%23e0a93b%27%20mask%3D%27url%28%23m%29%27%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(224, 169, 59, 0.55));
  opacity: .96; animation: crescentRise .8s ease-out both;
}
@keyframes crescentRise { from { opacity: 0; top: 24px; } to { opacity: .96; top: 16px; } }
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; } }

.hero .eyebrow { color: var(--gold-soft); padding-right: 64px; }
.hero .eyebrow::before { background: var(--gold); }
.hero-date { font-family: var(--font-display); font-size: var(--t-hero); line-height: 1.05; margin: 4px 0 2px; color: var(--hero-ink); padding-right: 64px; }
.hero-greg { font-size: var(--t-small); color: rgba(253, 246, 234, 0.78); padding-right: 64px; }
.hero b { color: var(--gold-soft); font-weight: 700; }
.hero-alt {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.hero-alt .label { font-size: var(--t-eyebrow); letter-spacing: .12em; text-transform: uppercase; color: rgba(253, 246, 234, 0.6); }
.hero-alt .val { font-family: var(--font-display); font-size: 1.05rem; color: var(--gold-soft); }

/* ── converter ── */
.conv-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.conv-tabs button {
  flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 10px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--t-small); transition: .15s;
}
.conv-tabs button[aria-pressed='true'] { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.conv-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.conv-grid label { font-size: var(--t-eyebrow); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }
.conv-result { margin-top: 14px; background: var(--emerald-tint); border-radius: var(--r-sm); padding: 14px; text-align: center; }
.conv-result .big { font-family: var(--font-display); font-size: 1.6rem; color: var(--emerald-deep); line-height: 1.1; }
:root[data-theme='dark'] .conv-result .big { color: #5fe0b0; }
.conv-result .small { font-size: var(--t-small); color: var(--ink-2); margin-top: 4px; }
.conv-note { font-size: var(--t-small); color: var(--ink-3); margin-top: 10px; text-align: center; line-height: 1.55; }

/* ── month grid ── */
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-head .nav { border: none; background: var(--surface-2); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; transition: filter .15s; }
.month-head .nav:active { filter: brightness(.95); }
.month-title { text-align: center; }
.month-title .h { font-family: var(--font-display); font-size: 1.2rem; }
.month-title .g { font-size: var(--t-small); color: var(--ink-3); }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.dow span { text-align: center; font-size: var(--t-eyebrow); font-weight: 800; color: var(--ink-3); }
.dow span:first-child, .dow span:last-child { color: var(--gold-deep); }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cell {
  aspect-ratio: 1; border-radius: var(--r-sm); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; position: relative;
}
.cell .greg { font-size: 0.55rem; color: var(--ink-3); font-weight: 600; margin-top: 1px; }
.cell.empty { background: transparent; }
.cell.today { background: var(--emerald); color: #fff; }
.cell.today .greg { color: rgba(255, 255, 255, 0.85); }
.cell.today::after {
  content: ''; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2064%2064%27%3E%3Cdefs%3E%3Cmask%20id%3D%27m2%27%3E%3Crect%20width%3D%2764%27%20height%3D%2764%27%20fill%3D%27white%27%2F%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%2726%27%20r%3D%2722%27%20fill%3D%27black%27%2F%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2730%27%20cy%3D%2732%27%20r%3D%2724%27%20fill%3D%27%23f7e7c4%27%20mask%3D%27url%28%23m2%29%27%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; opacity: .95;
}
.cell.friday { box-shadow: inset 0 0 0 1.5px var(--gold); }

/* ── range / custom hisab panel ── */
.adv summary { cursor: pointer; font-weight: 800; font-size: var(--t-small); color: var(--ink-2); padding: 6px 0; }
.adv .progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 10px; display: none; }
.adv .progress > i { display: block; height: 100%; width: 0; background: var(--emerald); transition: width .15s; }

/* ── modern display weights ── */
.hero-date { font-weight: 800; letter-spacing: -0.02em; }
.conv-result .big, .month-title .h { font-weight: 800; letter-spacing: -0.01em; }
.hero-alt .val { font-weight: 700; }
