/* =====================
   muhurat.css
===================== */

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

body {
  margin: 0;
  background: #1e293b;
  color: #f8f4e6;
}

/* =====================
   MAIN APP CONTAINER
===================== */
.app {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* =====================
   LOCATION BAR
===================== */
.loc-bar {
  background: linear-gradient(180deg, #0a1628 0%, #111e33 100%);
  border-top: 1px solid rgba(212,160,23,0.25);
  border-bottom: 1px solid rgba(212,160,23,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(212,160,23,0.08);
  border-radius: 20px 20px 20px 20px;
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.loc-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(212,160,23,0.06) 0%, transparent 100%);
  pointer-events: none;
  border-radius: inherit;
}

.loc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.loc-badge {
  display: none;
  align-items: center;
  gap: 5px;
  background: rgba(212,160,23,0.12);
  border: 1px solid rgba(212,160,23,0.35);
  color: #d4a017;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 100px;
}

#locationStatus {
  font-size: 0.78rem;
  color: #86efac;
  margin: 0;
  text-align: center;
}

.loc-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 480px;
}

.loc-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.loc-search-inner {
  display: flex;
  align-items: center;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(212,160,23,0.28);
  border-radius: 9px;
  padding: 0 12px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.loc-search-input:focus {
  outline: none;
  box-shadow: none;
}

.loc-search-inner:focus-within {
  border-color: rgba(212,160,23,0.65);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.08);
  outline: none;
}

.loc-search-icon {
  color: #d4a017;
  flex-shrink: 0;
}

.loc-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f8f4e6;
  font-size: 0.875rem;
  padding: 11px 0;
  font-family: inherit;
}

.loc-search-input::placeholder {
  color: rgba(248,244,230,0.3);
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a2840;
  border: 1px solid rgba(212,160,23,0.22);
  border-radius: 10px;
  overflow: hidden;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.city-option {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(212,160,23,0.1);
  transition: background 0.15s;
}

.city-option:last-child {
  border-bottom: none;
}

.city-option:hover {
  background: rgba(212,160,23,0.1);
}

.city-opt-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f8f4e6;
}

.city-opt-sub {
  font-size: 0.75rem;
  color: rgba(248,244,230,0.45);
  margin-top: 1px;
}

.loc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(212,160,23,0.35);
  color: #d4a017;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
  height: 42px;
  flex-shrink: 0;
}

.loc-btn:hover {
  background: rgba(212,160,23,0.1);
  border-color: rgba(212,160,23,0.6);
}

.loc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =====================
   CURRENT CARD
===================== */
.current-card {
  background: #0f172a;
  color: #f8f4e6;
  border-radius: 16px;
  padding: 28px;
  margin: 24px 16px 0;
}

.current-title {
  font-size: 15px;
  opacity: .75;
}

.current-name {
  font-size: 42px;
  font-weight: 800;
  margin-top: 10px;
}

.current-time {
  font-size: 20px;
  margin-top: 6px;
}

.current-meaning {
  font-size: 16px;
  margin-top: 6px;
  opacity: .85;
}

/* =====================
   DATE BAR
===================== */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  margin-top: 20px;
  margin-bottom: 32px;
  flex-wrap: nowrap;
}

.nav-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(212,160,23,0.35);
  border-radius: 9px;
  color: #d4a017;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.nav-btn:hover {
  background: rgba(212,160,23,0.1);
}

.today-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(212,160,23,0.35);
  border-radius: 9px;
  color: #d4a017;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 14px;
  height: 38px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.today-btn:hover {
  background: rgba(212,160,23,0.1);
}

.date-display {
  flex: 1;
  max-width: 160px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: transparent;
  border: 1px solid rgba(212,160,23,0.35);
  border-radius: 10px;
  color: #f8f4e6;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
}

.date-display::-webkit-calendar-picker-indicator {
  display: none;
}

.date-display:focus,
.date-display:active {
  outline: none;
  border-color: rgba(212,160,23,0.65);
  box-shadow: none;
  background: transparent;
}

/* =====================
   TABLE
===================== */
.table-title {
  font-weight: 700;
  font-size: 20px;
  margin: 18px 0 14px;
}

.choghadiya-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #0f172a;
  border-radius: 18px;
  overflow: hidden;
}

.choghadiya-table thead th {
  background: #020617;
  color: #f8f4e6;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 16px 20px;
}

.choghadiya-table td {
  padding: 18px 20px;
  font-size: 17px;
  color: #020617;
}

.chogh {
  font-weight: 800;
  cursor: pointer;
}

.choghadiya-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* =====================
   STATE COLORS
===================== */
.Amrut  { background: #dcfce7; color: #064e3b; }
.Shubh  { background: #e0f2fe; color: #075985; }
.Laabh  { background: #ecfeff; color: #155e75; }
.Chal   { background: #fef9c3; color: #713f12; }
.Rog    { background: #fee2e2; color: #7f1d1d; }
.Kaal   { background: #fecaca; color: #7f1d1d; }
.Udveg  { background: #ffe4e6; color: #881337; }

.active {
  outline: 3px solid #d4a017;
  outline-offset: -3px;
}

/* =====================
   MISC BADGES
===================== */
.q-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.q-badge.good    { background: rgba(74,222,128,0.18);  color: #4ade80; }
.q-badge.bad     { background: rgba(248,113,113,0.18); color: #f87171; }
.q-badge.neutral { background: rgba(250,204,21,0.15);  color: #fbbf24; }

tr.section-header td {
  background: rgba(212,160,23,0.08);
  color: rgba(212,160,23,0.8);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-top: 1px solid rgba(212,160,23,0.15);
}

/* =====================
   POPUP
===================== */
.popup {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(2,6,23,.65);
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.popup-box {
  background: #ffffff;
  color: #020617;
  padding: 28px;
  border-radius: 18px;
  width: 90vw;
  max-width: 520px;
  min-width: 280px;
  text-align: center;
}

.popup-box h3 {
  font-size: 26px;
  font-weight: 800;
}

.popup-box p {
  font-size: 17px;
  margin-top: 10px;
}

.popup-box button {
  margin-top: 22px;
  padding: 12px 26px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: #f8f4e6;
  cursor: pointer;
}

/* =====================
   MOBILE
===================== */
@media (max-width: 480px) {
  .loc-row {
    flex-direction: column;
    gap: 8px;
  }
  .loc-btn {
    width: 100%;
    height: 42px;
    font-size: 0.82rem;
    justify-content: center;
  }
  .loc-search-input {
    font-size: 16px;
  }
}