/* ===================================================================
   Vedic astrology (Jyotish) — scoped theme: saffron · gold · maroon.
   Everything is under .vedic-page so it never leaks into the cosmic theme.
   =================================================================== */
.vedic-page {
    --v-saffron: #ff9933;
    --v-gold: #e4b44c;
    --v-gold-2: #f6d38a;
    --v-maroon: #6b0f1a;
    --v-maroon-2: #3a0a10;
    --v-cream: #fff3d6;
    --v-ink: #f7e7c6;
    font-family: Georgia, "Times New Roman", "Noto Serif", serif;
    color: var(--v-ink);
    position: relative;
    padding-bottom: 30px;
}

/* Warm parchment/temple backdrop with a faint mandala of rays */
.vedic-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 600px at 50% -10%, rgba(255, 153, 51, 0.16), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(228, 180, 76, 0.12), transparent 60%),
        repeating-conic-gradient(from 0deg at 50% 42%, rgba(228, 180, 76, 0.05) 0deg 6deg, transparent 6deg 12deg),
        linear-gradient(180deg, #200608 0%, #14060a 60%, #0b0407 100%);
}

/* ---------- Hero ---------- */
.v-hero { text-align: center; padding: 22px 10px 8px; }
.v-om { font-size: 3rem; color: var(--v-gold); text-shadow: 0 0 26px rgba(228, 180, 76, 0.6); line-height: 1; }
.v-title {
    margin: 6px 0 2px; font-weight: 700; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--v-saffron), var(--v-gold-2), var(--v-saffron));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.v-sanskrit { color: var(--v-gold); letter-spacing: .1em; font-size: 1.05rem; }
.v-lead { color: rgba(255, 243, 214, 0.8); max-width: 760px; margin: 10px auto 0; }

/* ---------- Cards ---------- */
.v-card {
    background: linear-gradient(160deg, rgba(107, 15, 26, 0.42), rgba(58, 10, 16, 0.55));
    border: 1px solid rgba(228, 180, 76, 0.45);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(228, 180, 76, 0.12);
    padding: 18px 20px;
    margin: 16px 0;
}
.v-card--chart { text-align: center; }
.v-card__title { color: var(--v-gold-2); font-weight: 700; margin: 0 0 12px; letter-spacing: .3px; }
.v-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.v-card__row .v-card__title { margin: 0; }
.v-muted { color: rgba(255, 243, 214, 0.55); }
.v-subhead { color: var(--v-gold); margin-bottom: 10px; }
.v-note { color: rgba(255, 243, 214, 0.7); font-size: .88rem; margin: 12px 0 0; }

/* ---------- Form ---------- */
.v-label { display: block; color: var(--v-gold); font-size: .86rem; margin-bottom: 4px; }
.v-input {
    display: block;
    width: 100%;
    min-width: 0;                 /* let date/time/number inputs shrink inside grid columns */
    box-sizing: border-box;       /* padding + border stay within the column width */
    height: 44px;                 /* uniform height across text/date/time/number so rows align */
    background: rgba(12, 5, 6, 0.75);
    border: 1px solid rgba(228, 180, 76, 0.4);
    border-radius: 10px;
    color: var(--v-cream);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    -webkit-appearance: none;      /* tame iOS default date/time chrome */
    appearance: none;
}
/* Native date/time controls report an inner height — keep the text vertically centred. */
.v-input[type="date"], .v-input[type="time"] { line-height: normal; }
.v-input:focus { outline: none; border-color: var(--v-saffron); box-shadow: 0 0 0 .2rem rgba(255, 153, 51, 0.25); }
.v-input::placeholder { color: rgba(255, 243, 214, 0.4); }
/* Make native date/time pickers legible on the dark theme */
.v-input::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(1) saturate(4) hue-rotate(5deg); }

.v-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Buttons ---------- */
.v-btn {
    border: 1px solid rgba(228, 180, 76, 0.55);
    background: rgba(107, 15, 26, 0.5);
    color: var(--v-gold-2);
    font-family: inherit;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, background .2s;
}
.v-btn:hover { filter: brightness(1.12); box-shadow: 0 8px 24px rgba(228, 180, 76, 0.28); background: rgba(107, 15, 26, 0.7); }
.v-btn:active { transform: translateY(1px); }
.v-btn--primary {
    background: linear-gradient(135deg, var(--v-saffron), var(--v-gold));
    color: #3a0a10; border-color: transparent;
    box-shadow: 0 8px 24px rgba(255, 153, 51, 0.4);
}
.v-btn--sm { padding: 5px 12px; font-size: .85rem; }
.v-topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.v-topics .v-topic { flex: 1 1 auto; }

/* ---------- Planet table ---------- */
.v-table { width: 100%; border-collapse: collapse; }
.v-table th, .v-table td { padding: 7px 8px; border-bottom: 1px solid rgba(228, 180, 76, 0.18); text-align: left; }
.v-table th { color: var(--v-gold); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.v-table td { color: var(--v-cream); }
.v-glyph { font-size: 1.05rem; }

/* ---------- Dasha timeline ---------- */
.v-dasha {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 9px 14px; margin: 7px 0; border-radius: 10px;
    border: 1px solid rgba(228, 180, 76, 0.22);
    background: rgba(12, 5, 6, 0.4);
}
.v-dasha__lord { font-weight: 700; color: var(--v-gold-2); min-width: 90px; }
.v-dasha__span { color: rgba(255, 243, 214, 0.8); font-variant-numeric: tabular-nums; }
.v-dasha__tag { margin-left: auto; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 10px; border-radius: 999px; }
.v-dasha--now { border-color: var(--v-saffron); background: rgba(255, 153, 51, 0.14); box-shadow: 0 0 18px rgba(255, 153, 51, 0.2); }
.v-dasha--now .v-dasha__tag { background: var(--v-saffron); color: #3a0a10; }
.v-dasha--past { opacity: 0.72; }
.v-dasha--past .v-dasha__tag { background: rgba(159, 176, 195, 0.3); color: #e6eefb; }
.v-dasha--future .v-dasha__tag { background: rgba(228, 180, 76, 0.25); color: var(--v-gold-2); }

/* ---------- Sources ---------- */
.v-sources { display: flex; flex-wrap: wrap; gap: 10px; }
.v-sources a {
    color: var(--v-gold-2); text-decoration: none;
    border: 1px solid rgba(228, 180, 76, 0.4); border-radius: 999px; padding: 5px 14px;
    transition: background .15s, color .15s;
}
.v-sources a:hover { background: rgba(228, 180, 76, 0.18); color: #fff; }

/* ---------- Graha Chakra animation ---------- */
.v-chakra-rot { animation: v-spin 120s linear infinite; }
.v-upright { animation: v-spin-rev 120s linear infinite; transform-box: fill-box; transform-origin: center; }
.v-graha:hover circle { filter: brightness(1.3); }
.v-star { animation: v-twinkle 2.6s ease-in-out infinite; }
@keyframes v-spin { to { transform: rotate(360deg); } }
@keyframes v-spin-rev { to { transform: rotate(-360deg); } }
@keyframes v-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Place-lookup popup (country + city -> lat/lon) ---------- */
#v-geo {
    /* This modal is appended to <body>, outside .vedic-page, so re-declare the
       Vedic palette here — otherwise var(--v-saffron/--v-gold) are undefined and
       the primary Search button loses its gold gradient (dark text on dark red). */
    --v-saffron: #ff9933;
    --v-gold: #e4b44c;
    --v-gold-2: #f6d38a;
    position: fixed; inset: 0; z-index: 1140; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: radial-gradient(ellipse at center, rgba(20, 6, 6, 0.82), rgba(8, 3, 4, 0.92));
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: Georgia, "Times New Roman", "Noto Serif", serif;
}
#v-geo.is-active { display: flex; }
.v-geo__box {
    width: min(560px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
    background: linear-gradient(160deg, #3a0a10, #200608);
    border: 1px solid rgba(228, 180, 76, 0.55); border-radius: 16px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(228, 180, 76, 0.15);
    overflow: hidden;
}
.v-geo__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid rgba(228, 180, 76, 0.3);
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.18), rgba(228, 180, 76, 0.1));
    color: var(--v-gold-2); font-weight: 700; font-size: 1.1rem;
}
.v-geo__close {
    background: transparent; border: none; color: var(--v-gold); font-size: 1.1rem;
    cursor: pointer; border-radius: 8px; padding: 4px 8px; transition: background .15s, color .15s;
}
.v-geo__close:hover { background: rgba(228, 180, 76, 0.2); color: #fff; }
.v-geo__body { padding: 18px; overflow-y: auto; }
.v-geo__results { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.v-geo__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
    padding: 10px 14px; border-radius: 10px; cursor: pointer;
    background: rgba(12, 5, 6, 0.5); border: 1px solid rgba(228, 180, 76, 0.3);
    color: var(--v-cream); font-family: inherit; transition: background .15s, border-color .15s, transform .1s;
}
.v-geo__item:hover { background: rgba(255, 153, 51, 0.14); border-color: var(--v-saffron); transform: translateY(-1px); }
.v-geo__place { font-weight: 600; }
.v-geo__coord { color: var(--v-gold); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 575px) {
    .v-title { font-size: 1.8rem; }
    .v-topics .v-topic { flex-basis: 100%; }
}
