/* ==========================================================================
   calendar.css — Muhurtas.com Hindu Muhurat & Panchang Calendar Styles
   Depends on design tokens defined in style.css (var(--color-*), etc.)
   Mobile-first responsive. Fonts: Poppins (headings), Inter (body)
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESIGN TOKEN FALLBACKS
   (in case style.css tokens are not yet loaded in isolation)
   -------------------------------------------------------------------------- */
:root {
  --color-saffron:        #FF9933;
  --color-saffron-light:  #FFF0DC;
  --color-gold:           #F4A460;
  --color-gold-dark:      #DAA520;
  --color-gold-light:     #FFF8DC;
  --color-maroon:         #800020;
  --color-maroon-light:   #F9E8EC;
  --color-cream:          #FFF8E7;
  --color-green:          #228B22;
  --color-green-light:    #E8F5E8;
  --color-grey:           #808080;
  --color-grey-light:     #F0F0F0;
  --color-purple:         #6B21A8;
  --color-purple-light:   #F3E8FF;
  --color-red:            #DC2626;
  --color-red-light:      #FEE2E2;
  --color-white:          #FFFFFF;
  --color-text:           #1A1A1A;
  --color-text-muted:     #6B7280;
  --color-border:         #E5E7EB;

  --font-heading:         'Poppins', sans-serif;
  --font-body:            'Inter', sans-serif;

  --radius-sm:            4px;
  --radius-md:            8px;
  --radius-lg:            12px;
  --radius-full:          9999px;

  --shadow-sm:            0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:            0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg:            0 8px 24px rgba(0,0,0,0.16);

  --transition-fast:      150ms ease;
  --transition-base:      250ms ease;
  --transition-slow:      400ms ease;
}


/* ==========================================================================
   1. CALENDAR WRAPPER & OUTER LAYOUT
   ========================================================================== */

.calendar-wrapper {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.calendar-container {
  padding: 0;
}


/* ==========================================================================
   2. CALENDAR NAVIGATION
   ========================================================================== */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--color-maroon);
  color: var(--color-white);
  flex-wrap: wrap;
}

/* Prev / Next arrow buttons */
.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
  font-size: 18px;
  line-height: 1;
}

.cal-nav-btn:hover,
.cal-nav-btn:focus-visible {
  background: rgba(255,255,255,0.30);
  transform: scale(1.08);
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 2px;
}

.cal-nav-btn:active {
  transform: scale(0.95);
}

/* Month/Year heading — clickable to open picker */
.cal-month-heading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}

.cal-month-heading-btn {
  background: none;
  border: none;
  color: var(--color-white);
  font: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
}

.cal-month-heading-btn:hover,
.cal-month-heading-btn:focus-visible {
  background: rgba(255,255,255,0.18);
  outline: none;
}

.cal-month-heading-btn .caret {
  font-size: 0.65em;
  opacity: 0.8;
  transition: transform var(--transition-fast);
}

.cal-month-heading-btn[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

/* Nav right controls cluster */
.cal-nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* "Today" button */
.cal-today-btn {
  padding: 5px 12px;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.cal-today-btn:hover,
.cal-today-btn:focus-visible {
  background: rgba(255,255,255,0.2);
  border-color: var(--color-white);
  outline: none;
}

/* Quick-jump dropdowns (month & year) */
.cal-jump-select {
  padding: 5px 8px;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  padding-right: 24px;
}

.cal-jump-select:hover,
.cal-jump-select:focus-visible {
  background-color: rgba(255,255,255,0.22);
  outline: none;
}

.cal-jump-select option {
  background: var(--color-maroon);
  color: var(--color-white);
}


/* ==========================================================================
   3. VIEW TOGGLE (Grid / List)
   ========================================================================== */

.cal-view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  gap: 8px;
}

.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border: none;
  background: var(--color-white);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1;
}

.view-toggle-btn + .view-toggle-btn {
  border-left: 1.5px solid var(--color-border);
}

.view-toggle-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.view-toggle-btn:hover {
  background: var(--color-cream);
  color: var(--color-text);
}

.view-toggle-btn.active,
.view-toggle-btn[aria-pressed="true"] {
  background: var(--color-saffron);
  color: var(--color-white);
}

.view-toggle-btn.active svg,
.view-toggle-btn[aria-pressed="true"] svg {
  stroke: var(--color-white);
}


/* ==========================================================================
   4. CALENDAR GRID — 7-column layout
   ========================================================================== */

.calendar-grid-view {
  background: var(--color-white);
}

/* Days-of-week header row */
.cal-dow-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid var(--color-border);
}

.cal-dow-cell {
  padding: 8px 2px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}

/* Sunday column — highlight */
.cal-dow-cell:first-child {
  color: var(--color-maroon);
}

/* Date cells grid */
.cal-dates-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* Individual date cell */
.date-cell {
  position: relative;
  min-height: 72px;
  padding: 6px 5px 4px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: none;
  border-left: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  outline: none;
  overflow: hidden;
}

/* Remove right border on last column */
.date-cell:nth-child(7n) {
  border-right: none;
}

/* Hover lift */
.date-cell:hover {
  background: var(--color-cream);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  z-index: 1;
}

.date-cell:focus-visible {
  outline: 2px solid var(--color-saffron);
  outline-offset: -2px;
  z-index: 2;
}

/* Date number */
.date-number {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 1px;
}

/* Sunday date number */
.date-cell:nth-child(7n+1) .date-number {
  color: var(--color-maroon);
}

/* Tithi name — tiny label */
.date-tithi {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Festival indicator dots row */
.date-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 3px;
}

.date-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.date-dot-festival  { background: var(--color-saffron); }
.date-dot-ekadashi  { background: var(--color-green); }
.date-dot-purnima   { background: var(--color-gold-dark); }
.date-dot-amavasya  { background: var(--color-grey); }
.date-dot-vrat      { background: var(--color-purple); }
.date-dot-holiday   { background: var(--color-red); }


/* --------------------------------------------------------------------------
   DATE CELL VARIANTS
   -------------------------------------------------------------------------- */

/* Festival day */
.date-cell.date-festival {
  background: #FFF5E6;
  border-left: 3px solid var(--color-saffron);
}

.date-cell.date-festival .date-number {
  color: #C05A00;
}

/* Ekadashi */
.date-cell.date-ekadashi {
  background: var(--color-green-light);
  border-left: 3px solid var(--color-green);
}

.date-cell.date-ekadashi .date-number {
  color: #145214;
}

.date-cell.date-ekadashi .date-tithi {
  color: #2E6B2E;
}

/* Purnima (full moon) */
.date-cell.date-purnima {
  background: var(--color-gold-light);
  border: 1px solid var(--color-gold-dark);
  border-top: none;
}

.date-cell.date-purnima .date-number {
  color: #7A5A00;
}

/* Amavasya (new moon) */
.date-cell.date-amavasya {
  background: #F5F5F5;
  border-color: #C0C0C0;
}

.date-cell.date-amavasya .date-number {
  color: #555555;
}

.date-cell.date-amavasya .date-tithi {
  color: #888888;
}

/* Today */
.date-cell.date-today {
  border: 2px solid var(--color-maroon) !important;
  box-shadow: 0 2px 8px rgba(128,0,32,0.18);
  z-index: 1;
}

.date-cell.date-today .date-number {
  color: var(--color-maroon);
  font-weight: 700;
}

/* Selected */
.date-cell.date-selected,
.date-cell[aria-selected="true"] {
  background: var(--color-maroon) !important;
  border-color: var(--color-maroon) !important;
}

.date-cell.date-selected .date-number,
.date-cell[aria-selected="true"] .date-number {
  color: var(--color-white);
}

.date-cell.date-selected .date-tithi,
.date-cell[aria-selected="true"] .date-tithi {
  color: rgba(255,255,255,0.75);
}

/* Other month */
.date-cell.date-other-month {
  opacity: 0.4;
  pointer-events: none;
}

/* Empty filler cell */
.date-cell.date-empty {
  background: var(--color-cream);
  cursor: default;
  pointer-events: none;
}


/* ==========================================================================
   5. LIST VIEW
   ========================================================================== */

.calendar-list-view {
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Date divider */
.list-date-divider {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 6px 16px;
  background: var(--color-maroon);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Day card */
.list-day-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.list-day-card:hover {
  background: var(--color-cream);
}

.list-day-card:last-child {
  border-bottom: none;
}

/* Card heading row */
.list-day-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.list-day-date {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-maroon);
  line-height: 1;
}

.list-day-weekday {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.list-day-tithi-inline {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Panchang tags row */
.list-panchang-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.panchang-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 500;
  background: var(--color-grey-light);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.panchang-tag-label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* Festival list */
.list-festivals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.list-festival-name {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: #8B4500;
}

/* Muhurat summary line */
.list-muhurat-summary {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.list-muhurat-summary strong {
  color: var(--color-green);
  font-weight: 600;
}


/* ==========================================================================
   6. FESTIVAL BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-festival {
  background: var(--color-saffron-light);
  color: #8B4500;
  border: 1px solid #FFBA66;
}

.badge-ekadashi {
  background: var(--color-green-light);
  color: #145214;
  border: 1px solid #7FBA7F;
}

.badge-purnima {
  background: var(--color-gold-light);
  color: #7A5A00;
  border: 1px solid #D4AF37;
}

.badge-vrat {
  background: var(--color-purple-light);
  color: #4A1070;
  border: 1px solid #B07FD0;
}

.badge-holiday {
  background: var(--color-red-light);
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.badge-amavasya {
  background: #F0F0F0;
  color: #444444;
  border: 1px solid #C0C0C0;
}


/* ==========================================================================
   7. DATE DETAIL MODAL (slide-in panel)
   ========================================================================== */

/* Overlay backdrop */
.date-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.date-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal panel — slides from bottom on mobile */
.date-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--color-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  overflow: hidden;
}

.date-modal.is-open {
  transform: translateY(0);
}

/* Modal handle (swipe indicator) */
.date-modal-handle {
  width: 40px;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin: 10px auto 0;
  flex-shrink: 0;
}

/* Modal header */
.date-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.date-modal-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-maroon);
  line-height: 1.2;
}

.date-modal-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.date-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-grey-light);
  color: var(--color-text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.date-modal-close:hover {
  background: var(--color-maroon-light);
  color: var(--color-maroon);
}

/* Modal scrollable body */
.date-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  overscroll-behavior: contain;
}

/* Panchang section within modal */
.panchang-section {
  margin-bottom: 18px;
}

.panchang-section-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-saffron);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-saffron-light);
}

.panchang-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.panchang-row:last-child {
  border-bottom: none;
}

.panchang-label {
  font-size: 0.77rem;
  color: var(--color-text-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 90px;
}

.panchang-value {
  font-size: 0.82rem;
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
}

.panchang-value-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 1px;
}

/* Muhurat timings table */
.muhurat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.muhurat-table th {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 6px 8px;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.muhurat-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.muhurat-table tr:last-child td {
  border-bottom: none;
}

.muhurat-name {
  font-weight: 600;
  color: var(--color-text);
}

.muhurat-time {
  color: var(--color-text-muted);
  font-size: 0.77rem;
}

.muhurat-good {
  color: var(--color-green);
  font-size: 0.72rem;
  font-weight: 600;
}

.muhurat-bad {
  color: var(--color-red);
  font-size: 0.72rem;
  font-weight: 600;
}


/* ==========================================================================
   8. MONTH / YEAR PICKER DROPDOWN
   ========================================================================== */

.cal-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base),
    transform var(--transition-base);
}

.cal-picker-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Year selector row */
.picker-year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.picker-year-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-maroon);
}

.picker-year-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.picker-year-btn:hover {
  border-color: var(--color-maroon);
  background: var(--color-maroon-light);
  color: var(--color-maroon);
}

/* Month grid */
.picker-months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.picker-month-btn {
  padding: 7px 4px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.picker-month-btn:hover {
  background: var(--color-saffron-light);
  border-color: var(--color-saffron);
  color: #8B4500;
}

.picker-month-btn.is-current {
  background: var(--color-saffron);
  border-color: var(--color-saffron);
  color: var(--color-white);
  font-weight: 600;
}

.picker-month-btn.is-selected {
  background: var(--color-maroon);
  border-color: var(--color-maroon);
  color: var(--color-white);
  font-weight: 600;
}


/* ==========================================================================
   9. LOADING SKELETON ANIMATIONS
   ========================================================================== */

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #F0F0F0 25%,
    #E0E0E0 50%,
    #F0F0F0 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Skeleton for calendar grid */
.cal-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border);
  padding: 1px;
}

.cal-skeleton-cell {
  background: var(--color-white);
  min-height: 72px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-date-num {
  width: 24px;
  height: 16px;
}

.skeleton-tithi {
  width: 70%;
  height: 10px;
}

.skeleton-dot-row {
  display: flex;
  gap: 4px;
  margin-top: auto;
}

.skeleton-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

/* Skeleton for list view */
.cal-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cal-skeleton-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-heading {
  width: 120px;
  height: 18px;
}

.skeleton-tags {
  display: flex;
  gap: 6px;
}

.skeleton-tag {
  width: 70px;
  height: 20px;
  border-radius: var(--radius-full);
}

.skeleton-text {
  width: 90%;
  height: 12px;
}

.skeleton-text.short {
  width: 60%;
}


/* ==========================================================================
   10. RESPONSIVE — TABLET (≥ 640px)
   ========================================================================== */

@media (min-width: 640px) {
  .calendar-nav {
    padding: 14px 20px;
    flex-wrap: nowrap;
  }

  .cal-month-heading {
    font-size: 1.2rem;
  }

  .date-cell {
    min-height: 84px;
    padding: 8px 7px 5px;
  }

  .date-number {
    font-size: 1.1rem;
  }

  .date-tithi {
    font-size: 0.65rem;
  }

  /* List view becomes optional on tablet — grid is default */
  .calendar-list-view.hidden-tablet {
    display: none;
  }

  .list-day-card {
    padding: 16px 20px;
  }

  /* Date modal slides from right on tablet+ */
  .date-modal {
    bottom: auto;
    right: 0;
    top: 0;
    left: auto;
    width: 380px;
    max-height: 100vh;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transform: translateX(100%);
  }

  .date-modal.is-open {
    transform: translateX(0);
  }

  .date-modal-handle {
    display: none;
  }

  /* Hide picker below nav on tablet */
  .cal-picker-dropdown {
    min-width: 300px;
  }
}


/* ==========================================================================
   11. RESPONSIVE — DESKTOP (≥ 900px)
   ========================================================================== */

@media (min-width: 900px) {
  .calendar-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    max-width: 1280px;
    align-items: start;
  }

  /* Nav spans full width */
  .calendar-nav {
    grid-column: 1 / -1;
  }

  .cal-view-bar {
    grid-column: 1 / -1;
  }

  /* Grid view occupies left column */
  .calendar-grid-view,
  .calendar-list-view {
    grid-column: 1;
  }

  /* Modal docked in right column on large screens */
  .date-modal {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    transform: none;
    box-shadow: none;
    border-left: 1px solid var(--color-border);
    grid-column: 2;
    grid-row: 3 / 99;
  }

  .date-modal-overlay {
    display: none;
  }

  .date-modal-handle {
    display: none;
  }

  .date-cell {
    min-height: 90px;
    padding: 9px 8px 6px;
  }

  .date-number {
    font-size: 1.15rem;
  }

  .date-tithi {
    font-size: 0.68rem;
  }
}


/* ==========================================================================
   12. ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .date-cell,
  .date-cell:hover,
  .date-modal,
  .date-modal-overlay,
  .cal-picker-dropdown,
  .skeleton,
  .cal-nav-btn,
  .view-toggle-btn {
    transition: none;
    animation: none;
  }
}

/* Focus ring for keyboard users */
*:focus-visible {
  outline: 2px solid var(--color-saffron);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .date-cell,
  .badge,
  .view-toggle-btn,
  .cal-nav-btn {
    forced-color-adjust: auto;
  }
}
