/* tithi_calendar.css v1 — festivals, vrats, moon phases, filter, today highlight */

/* ── Card wrapper ─────────────────────────────────────────────── */
.cal-card { padding: 20px; overflow-x: auto; }

/* ── Top bar: heading + filter ────────────────────────────────── */
.cal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.cal-heading {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  color: var(--brand, #7c3aed);
  margin: 0;
}

/* ── Filter bar ───────────────────────────────────────────────── */
.cal-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-filter-btn {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid #d4d4d4;
  background: #f8f8f8;
  font-size: 12px;
  cursor: pointer;
  color: #57534e;
  transition: all 0.15s;
  white-space: nowrap;
}
.cal-filter-btn:hover  { border-color: var(--brand, #7c3aed); color: var(--brand, #7c3aed); }
.cal-filter-btn.active {
  background: var(--brand, #7c3aed);
  border-color: var(--brand, #7c3aed);
  color: #fff;
  font-weight: 600;
}

/* ── Legend ───────────────────────────────────────────────────── */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
}
.cal-legend span {
  padding: 3px 9px;
  border-radius: 10px;
  border: 1px solid;
}
.cal-leg-shukla   { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.cal-leg-krishna  { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.cal-leg-purnima  { background: #fef08a; border-color: #f59e0b; color: #78350f; }
.cal-leg-amavasya { background: #1e293b; border-color: #334155; color: #94a3b8; }
.cal-leg-festival { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.cal-leg-vrat     { background: #ede9fe; border-color: #a78bfa; color: #4c1d95; }

/* ── Calendar grid ────────────────────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  min-width: 560px;
}
.cal-hdr {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #9ca3af);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-empty { background: transparent; border: none !important; }

/* ── Day cells ────────────────────────────────────────────────── */
.cal-day {
  min-height: 100px;
  border-radius: 8px;
  padding: 7px 7px 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
  overflow: hidden;
  position: relative;
}
.cal-day:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  z-index: 2;
}
.cal-day-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3px;
}
.cal-day-num {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}
.cal-moon { font-size: 14px; line-height: 1; }

/* ── Today highlight ──────────────────────────────────────────── */
.cal-today {
  box-shadow: 0 0 0 2.5px #7c3aed, 0 2px 10px rgba(124,58,237,0.2) !important;
}
.cal-today .cal-day-num {
  background: var(--brand, #7c3aed);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ── Tithi text ───────────────────────────────────────────────── */
.cal-tithi-main {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #292524;
}
.cal-tithi2 { margin-top: 3px; opacity: 0.75; }
.cal-tithi-sub {
  font-size: 9.5px;
  color: #78716c;
  line-height: 1.3;
  margin-bottom: 2px;
}

/* ── Festival & Vrat tags ─────────────────────────────────────── */
.cal-tags {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.cal-tag {
  font-size: 9px;
  line-height: 1.3;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.cal-tag-festival {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}
.cal-tag-vrat {
  background: #ede9fe;
  color: #4c1d95;
  border: 1px solid #a78bfa;
}

/* ── Paksha colors ────────────────────────────────────────────── */
.cal-shukla   { background: #fffbeb; border-color: #fde68a; }
.cal-krishna  { background: #f8fafc; border-color: #cbd5e1; }
.cal-purnima  { background: #fef9c3; border-color: #fbbf24; }
.cal-amavasya { background: #1e293b; border-color: #475569; color: #e2e8f0; }
.cal-amavasya .cal-tithi-main { color: #e2e8f0; }
.cal-amavasya .cal-tithi-sub  { color: #94a3b8; }
.cal-amavasya .cal-tag-festival { background: #374151; color: #fcd34d; border-color: #6b7280; }
.cal-amavasya .cal-tag-vrat     { background: #2d1d4e; color: #c4b5fd; border-color: #7c3aed; }

@media (max-width: 640px) {
  .cal-day { min-height: 80px; padding: 5px 5px 4px; }
  .cal-day-num  { font-size: 13px; }
  .cal-moon     { font-size: 12px; }
  .cal-tithi-main { font-size: 10px; }
  .cal-tithi-sub  { font-size: 8.5px; }
  .cal-tag        { font-size: 8px; }
}
