/* ArudamAI tools: the birth chart form, the chart itself, and the result tables. */

/* ---------- forms: dates, times and the place search ---------- */
.form input[type='date'],
.form input[type='time'],
.form input[type='search'] {
    width: 100%;
    padding: 14px 16px;
    font: 400 16px var(--font);
    color: var(--cream);
    background: #14123a;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color-scheme: dark;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form input[type='date']:focus,
.form input[type='time']:focus,
.form input[type='search']:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 184, 36, 0.18); }
.form label small { color: var(--muted); font-weight: 400; margin-left: 6px; }

.tool-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: end; }
.tool-form .span2 { grid-column: span 2; }
.tool-form .span3 { grid-column: span 3; }
.tool-form .span4 { grid-column: 1 / -1; }
.tool-form .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.place { position: relative; }
.place-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    margin: 6px 0 0;
    padding: 6px;
    list-style: none;
    max-height: 280px;
    overflow: auto;
    background: #1b1850;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.place-list[hidden] { display: none; }
.place-list li { padding: 10px 12px; border-radius: 10px; color: var(--cream); font-size: 15px; cursor: pointer; }
.place-list li:hover { background: rgba(233, 184, 36, 0.14); }

/* The form card has no cut corners or clipping, so the city suggestions can hang below it */
.kcard.tool-form-card {
    clip-path: none;
    overflow: visible;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, #2a2766, #181547);
}
.kcard.tool-form-card::before,
.kcard.tool-form-card::after { display: none; }
.kcard.tool-form-card:hover { transform: none; }

.tool-section { padding: 0 0 26px; }
.tool-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 22px;
    color: var(--cream);
}
.tool-title::before { content: ''; flex: none; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.chip {
    padding: 7px 16px;
    font-size: 14px;
    color: var(--gold-light);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(233, 184, 36, 0.08);
}

/* ---------- details grid ---------- */
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 24px; }
.details-grid span { display: block; font-size: 12.5px; color: var(--muted); }
.details-grid b { display: block; font-weight: 600; color: var(--cream); font-size: 16px; }

/* ---------- South Indian chart ---------- */
.sichart {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    width: min(100%, 560px);
    aspect-ratio: 1;
    margin: 0 auto;
    border: 2px solid var(--gold);
    border-radius: 6px;
    background: linear-gradient(135deg, #1b1850, #121033);
    overflow: hidden;
}
.sichart .house { position: relative; min-width: 0; overflow: hidden; padding: 6px 8px; border: 1px solid rgba(233, 184, 36, 0.4); }
.sichart .house ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; font-weight: 600; font-size: 0.95rem; color: var(--cream); }
.sichart .house .sign { position: absolute; left: 6px; bottom: 3px; font-size: 0.62rem; color: var(--muted); }
.sichart .house li.lagna { color: var(--gold-light); }
.sichart .house li.inner { color: #7ee2a8; }
.sichart .house li.jama { color: #9bb8ff; font-weight: 600; }
.sichart .house .retro { font-size: 0.7rem; }
.sichart .house.is-lagna::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, transparent 47%, var(--gold) 48%, var(--gold) 52%, transparent 53%);
}
.sichart .centre {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px;
    text-align: center;
    border: 1px solid rgba(233, 184, 36, 0.4);
    background: radial-gradient(circle at 50% 40%, rgba(91, 79, 214, 0.28), transparent 70%);
}
.sichart .centre strong { font-size: 1.15rem; color: var(--gold-light); }
.sichart .centre span { font-size: 0.8rem; color: var(--lav); }
.sichart.dense .house ul { font-size: 0.8rem; gap: 1px 6px; }
.sichart.small { border-width: 1.5px; width: 100%; }
.sichart.small .house { padding: 3px 4px; }
.sichart.small .house ul { font-size: 0.72rem; gap: 1px 4px; }
.sichart.small .house .sign { display: none; }
.sichart.small .centre strong { font-size: 0.8rem; }
.sichart.small .centre span { font-size: 0.66rem; }
.chart-note { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 14px; font-size: 13px; }
.legend .g { color: #7ee2a8; }
.legend .b { color: #9bb8ff; }

.vargas { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.vargas .kcard { padding: 18px; }
.vargas h3 { font-size: 17px; text-align: center; color: var(--gold-light); margin-bottom: 12px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th,
.data-table td { padding: 11px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.data-table th { color: var(--gold); font-size: 13px; letter-spacing: 0.04em; font-weight: 600; }
.data-table td { color: var(--cream); }
.data-table td.num { font-variant-numeric: tabular-nums; color: var(--gold-light); }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

/* ---------- Tamil text on tool pages ---------- */
.tamil { font-family: 'Outfit', 'Noto Sans Tamil', 'Noto Sans Devanagari', 'Noto Sans Telugu', 'Noto Sans Kannada', 'Noto Sans Malayalam', 'Nirmala UI', 'Latha', 'Mangal', 'Gautami', 'Tunga', 'Kartika', system-ui, sans-serif; }

@media (max-width: 960px) {
    .tool-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .tool-form { grid-template-columns: 1fr; }
    .tool-form .span2, .tool-form .span3, .tool-form .span4 { grid-column: auto; }

    /* More room for the chart: slimmer card padding, tighter cells and centre text */
    .tool-section .kcard { padding: 12px; }
    .tool-section .kcard::after { display: none; }
    .sichart .house { padding: 4px 5px; }
    .sichart .house ul { font-size: 0.7rem; gap: 1px 4px; }
    .sichart .house .sign { display: none; }
    .sichart .centre { padding: 4px; gap: 0; }
    .sichart .centre strong { font-size: 0.95rem; }
    .sichart .centre span { font-size: 0.64rem; line-height: 1.25; }
    .sichart.dense .house ul { font-size: 0.64rem; gap: 0 3px; }
    .vargas { grid-template-columns: 1fr; }
    .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
    .details-grid b { font-size: 14.5px; }
    .data-table { font-size: 14px; }
    .data-table th, .data-table td { padding: 9px 10px; }
    .tool-title { font-size: 19px; }
}

/* ---------- print: just the result ---------- */
@media print {
    body { background: #fff !important; color: #000 !important; }
    #sky, .site-header, .site-footer, .result-actions, .page-banner .crumbs { display: none !important; }
    .kcard::before, .kcard { background: #fff !important; clip-path: none !important; border: 1px solid #999; }
    .kcard::after { display: none; }
    * { color: #000 !important; }
    .sichart { background: #fff; border-color: #000; }
    .sichart .house, .sichart .centre { border-color: #666; }
}

/* ---------- hint shown above a table that scrolls sideways ---------- */
.swipe-hint {
    display: block;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 10px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--gold-light);
    border: 1px dashed var(--line);
    border-radius: 999px;
    background: rgba(233, 184, 36, 0.07);
}
.swipe-hint[hidden] { display: none; }
.swipe-hint b { display: inline-block; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .swipe-hint b { animation: none; } }
@media print { .swipe-hint { display: none !important; } }

/* ---------- live / fixed chart bar (Arudam) ---------- */
.live-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 18px; font-size: 14px; color: var(--gold-light); }
.live-bar .btn { padding: 7px 18px; font-size: 14px; }
.live-bar.is-live { flex-wrap: nowrap; }
.live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: live-pulse 1.6s ease-out infinite; }
.live-bar.is-error .live-dot { background: var(--bad); animation: none; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@media print { .live-bar { display: none !important; } }

/* ---------- language and chart-style chooser ---------- */
.switcher { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 22px; }
.switch-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.switch-group a,
.switch-group button {
    font: inherit;
    background: transparent;
    cursor: pointer;
    padding: 7px 16px;
    font-size: 14px;
    color: var(--lav);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}
.switch-group a:hover,
.switch-group button:hover { color: var(--cream); background: rgba(255, 255, 255, 0.06); }
.switch-group a.on,
.switch-group button.on { color: var(--indigo); background: linear-gradient(90deg, var(--gold-light), var(--gold)); border-color: transparent; font-weight: 600; }

.form select.select,
select.select {
    width: 100%;
    padding: 14px 16px;
    font: 400 16px var(--font);
    color: var(--cream);
    background: #14123a;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color-scheme: dark;
}
select.select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 184, 36, 0.18); }
select.select option { background: #1b1850; color: var(--cream); }

/* ---------- North Indian chart ---------- */
.nchart { width: min(100%, 560px); margin: 0 auto; }
.nchart svg { width: 100%; height: auto; display: block; background: linear-gradient(135deg, #1b1850, #121033); border-radius: 6px; }
.nchart .nc-frame { fill: none; stroke: var(--gold); stroke-width: 3; }
.nchart .nc-house { fill: none; stroke: rgba(233, 184, 36, 0.55); stroke-width: 1.4; }
.nchart .nc-lagna-house { fill: rgba(233, 184, 36, 0.08); }
.nchart .nc-num { fill: var(--muted); font-size: 11px; }
.nchart .nc-text { fill: var(--cream); font-weight: 600; }
.nchart .nc-text .lagna { fill: var(--gold-light); }
.nchart .nc-text .inner { fill: #7ee2a8; }
.nchart .nc-text .jama { fill: #9bb8ff; }
.nchart .nc-caption { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 12px; text-align: center; }
.nchart .nc-caption strong { color: var(--gold-light); font-size: 1.05rem; }
.nchart .nc-caption span { color: var(--lav); font-size: 0.85rem; }
.nchart.small { width: 100%; }
.nchart.small .nc-caption { margin-top: 6px; }
.nchart.small .nc-caption strong { font-size: 0.85rem; }
.nchart.small .nc-caption span { display: none; }
@media print {
    .switcher { display: none !important; }
    .nchart svg { background: #fff; }
    .nchart .nc-text, .nchart .nc-text * { fill: #000 !important; }
}
