@import url("https://fonts.googleapis.com/css2?family=Questrial&display=swap");

:root {
  --saffron: #6fb89b;
  --saffron-hover: #92400e;
  --saffron-light: rgba(68, 164, 126, 0.1);
  --primary-green: rgb(124, 180, 158);
  --ekadashi-bg: #f0f9ff;
  --purnima-bg: #fffbeb;
  --amavasya-bg: #f7fafc;
  --pradosh-bg: #faf5ff;
}
body {
  background-color: #dbd2e0;
  font-family: "Questrial", sans-serif;
  min-height: 100vh;
  background-attachment: fixed;
  background-image:
    radial-gradient(at 90% 0%, rgba(68, 164, 126, 0.6) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.3) 0px, transparent 50%) !important;
}
.text-saffron {
  color: var(--saffron) !important;
}
.bg-saffron {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.navbar {
  background: transparent !important;
}
.card {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}
.btn-saffron {
  background-color: var(--saffron);
  color: white;
  border-color: var(--saffron);
  box-shadow: 0 4px 6px rgba(244, 119, 93, 0.2);
  transition: all 0.2s;
}

.navbar-brand {
  color: #000 !important;
}

/* Calendar */
.calendar-table {
  table-layout: fixed;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(15px);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border-collapse: separate;
  border-spacing: 0;
}
.calendar-table th {
  font-weight: 700;
  color: #000;
  background: rgba(255, 255, 255, 0.3);
  border: none !important;
  font-size: 11px;
  padding: 15px 5px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.calendar-cell {
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  position: relative;
  cursor: pointer;
  vertical-align: top;
  transition: all 0.2s ease;
  border: 0.5px solid rgba(0, 0, 0, 0.05) !important;
  overflow: hidden;
  background: transparent;
  border-radius: 0 !important;
}
.cell-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 5;
}
.calendar-cell::before {
  content: var(--moon-icon, "");
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 1.1rem;
  opacity: 1;
  line-height: 1;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
}
.calendar-cell:hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
  z-index: 10;
  border: 0.5px solid var(--saffron) !important;
}
.calendar-cell:hover::before {
  transform: scale(1.2);
}

.outside-date {
  opacity: 0.1;
  filter: grayscale(1);
  pointer-events: none;
}
.calendar-cell.active-today {
  background-color: var(--saffron-light);
  border: 2px solid var(--saffron) !important;
  border-radius: 16px;
  z-index: 8;
}
.calendar-cell.active-today .date-num {
  color: var(--saffron);
}

.calendar-cell.bg-ekadashi {
  background-color: #f0f9ff !important;
}
.calendar-cell.bg-purnima {
  background-color: #fffbeb !important;
}
.calendar-cell.bg-amavasya {
  background-color: #f7fafc !important;
}
.calendar-cell.bg-pradosh {
  background-color: #faf5ff !important;
}

.date-num {
  font-size: 1.6rem;
  font-weight: 400;
  color: #1a202c;
  line-height: 1;
  margin-bottom: 5px;
  position: relative;
  z-index: 5;
}
.calendar-cell {
    position: relative;
    height: 70px;
    vertical-align: top;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.calendar-cell::before {
    content: var(--moon-icon);
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 24px;
    opacity: 0.8; /* Bright on desktop */
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .calendar-cell::before {
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        font-size: 32px;
        opacity: 0.15; /* Background on mobile */
    }
}

.cell-content {
    position: relative;
    z-index: 2;
    height: 100%;
}

.panchang-sub {
  font-size: 10px;
  line-height: 1.3;
  color: #718096;
  font-weight: 600;
  text-transform: none;
}
.panchang-sub strong {
  color: var(--saffron);
  font-weight: 700;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
  width: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 767.98px) {
  .navbar .container-fluid {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px;
  }

  header .d-flex.align-items-center.gap-3 {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
    gap: 10px !important;
  }

  #coordDisplay {
    display: block !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  .navbar-brand {
    margin-right: 0 !important;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
  }
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #2d3748;
  line-height: 1.6;
}

/* Cards */
.card {
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden !important;
  margin-bottom: 20px;
}

/* Muhurta */
.muhurta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 10px;
}
.muhurta-box {
  border-radius: 12px;
  padding: 20px 10px;
  border: 1px solid var(--saffron-light);
  background: white;
  transition: all 0.2s;
}
.muhurta-box:hover {
  border-color: var(--saffron);
  box-shadow: 0 4px 12px rgba(244, 119, 93, 0.08);
}
.muhurta-label {
  font-size: 11px;
  font-weight: 800;
  color: #a0aec0;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.muhurta-time {
  font-size: 15px;
  font-weight: 700;
  color: #2d3748;
}

/* Compact Form */
.tiny-label {
  font-size: 10px;
  font-weight: 800;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control-sm {
  border-radius: 8px;
  font-size: 13px;
  padding: 0.5rem 0.75rem;
}

/* Status Badges */
.badge-auspicious {
  background: #d1fae5;
  color: #065f46;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 6px;
}
.badge-inauspicious {
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 6px;
}

@media (max-width: 991px) {
  .calendar-cell {
    height: 80px;
  }
  .date-num {
    font-size: 1.1rem;
  }
}

/* Tradition Toggles */
.tradition-toggle {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.tradition-toggle .btn {
  border: none !important;
  color: #4a5568;
  transition: all 0.2s;
  padding: 4px 14px !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px !important;
}
.tradition-toggle .btn:hover {
  color: #000;
  background: rgba(255, 255, 255, 0.2);
}
.tradition-toggle .btn-check:checked + .btn {
  background: #fff !important;
  color: #000 !important;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.utc-badge {
  background: #000 !important;
  color: #fff !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-weight: 800;
  font-size: 11px !important;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Limb Rows */
.limb-row {
  display: flex;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  flex-wrap: wrap; /* Allow wrapping */
}
.limb-label {
  min-width: 100px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a0aec0;
  font-weight: 800;
  margin-bottom: 5px;
}

@media (max-width: 575.98px) {
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .limb-row {
    flex-direction: column;
    padding: 12px 0 !important;
  }
  .limb-label {
    margin-bottom: 6px;
    font-size: 10px;
  }
}
.limb-value {
  flex-grow: 1;
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.limb-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.04);
  color: #000;
  padding: 3px 12px;
  border-radius: 8px;
  font-weight: 700;
  margin-right: 10px;
  font-size: 13px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.primary-limb-name {
  font-size: 18px;
  font-weight: 900;
  color: #000;
  margin-right: 5px;
}
.span-arrow {
  color: #cbd5e0;
  margin: 0 12px;
  font-weight: 300;
}
.end-time {
  font-size: 13px;
  color: #718096;
  font-weight: 600;
  margin-left: 8px;
}
.time-bold {
  font-weight: 900;
  color: #000;
  font-size: 15px;
}
.badge-bhadra {
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 800;
  margin-left: 8px;
}

/* ── Responsive Enhancements ────────────────────────────────────────── */

@media (max-width: 991.98px) {
  .container-fluid.px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

@media (max-width: 767.98px) {
  header .navbar-brand .fs-4 {
    font-size: 1.1rem !important;
  }

  #coordDisplay {
    display: block !important;
    font-size: 10px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }

  #btnLocation {
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  /* Calendar Mobile Scaling */
  .calendar-cell {
    height: 65px;
    padding: 4px;
  }

  .date-num {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .panchang-sub {
    font-size: 8px;
    line-height: 1.1;
  }

  /* Muhurta Grid Mobile */
  .muhurta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .muhurta-box {
    padding: 10px !important;
  }

  .muhurta-label {
    font-size: 10px !important;
  }

  .muhurta-time {
    font-size: 11px !important;
  }

  /* Birth Profile Mobile */
  .birth-info-box {
    font-size: 11px;
  }

  .limb-label {
    min-width: 80px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 575.98px) {
  .calendar-table th {
    font-size: 10px;
    padding: 5px 0;
  }

  .calendar-cell {
    height: 60px;
  }

  .time-bold {
    font-size: 13px !important;
  }

  .panchang-sub strong {
    display: block;
    max-width: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
