/* ═══════════════════════════════════════════════════════
   Tithi Calculator — Home-page matched design
   Prefix: tc-
   Uses --dc-* tokens from dc-tokens.css (site-wide)
   and --color-* tokens from styles.css
   ═══════════════════════════════════════════════════════ */

/* ── Page rail ── */
.tithi-page .main-content {
    max-width: calc(820px + 2 * var(--dc-pad-x, 40px));
    margin: 0 auto;
    padding: 0 var(--dc-pad-x, 40px) 80px;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────
   PAGE HEADING  (matches home-page heading pattern)
───────────────────────────────────────────────────── */
.tc-page-head {
    text-align: center;
    padding: 44px 0 32px;
}

/* Small all-caps eyebrow — same as "TELUGU DAILY PANCHANGAM" */
.tc-eyebrow {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dc-maroon, #7a1e2e);
    margin: 0 0 14px;
}

/* Large H1 — maroon display */
.tc-h1 {
    font-family: var(--dc-display, "Laila", Georgia, serif);
    font-size: clamp(1.7rem, 4.5vw, 2.5rem);
    font-weight: 800;
    color: var(--dc-maroon, #7a1e2e);
    line-height: 1.1;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.tc-subtitle {
    font-size: 1rem;
    color: var(--dc-mute, #5c5346);
    margin: 0 0 10px;
}

.tc-seo-text {
    font-size: 0.83rem;
    color: var(--dc-soft, #7a7162);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── HR divider ── */
.tc-divider {
    border: none;
    border-top: 1px solid var(--dc-line, #d4c4a8);
    margin: 0 0 28px;
}

/* ─────────────────────────────────────────────────────
   CALCULATOR FORM — borderless, half-width, centered
───────────────────────────────────────────────────── */
.tc-form-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 36px;
}

.tc-form-card {
    width: 100%;
    max-width: 420px;
    background: transparent;
    border: none;
}

.tc-form-card__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dc-maroon, #7a1e2e);
    margin: 0 0 14px;
}
.tc-form-card__label i { font-size: 0.75rem; }

.tc-form-card__body {
    padding: 0;
}

/* ── Date row ── */
.tc-date-row {
    display: flex;
    gap: 0;
    align-items: flex-end;
    margin-bottom: 16px;
}

.tc-date-field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-date-field__label {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dc-mute, #5c5346);
}

/* Flatpickr trigger button — styled like a date input */
.tc-date-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--dc-line, #d4c4a8);
    border-right: none;
    border-radius: 0;
    background: var(--dc-card, #fffdf6);
    color: var(--dc-ink, #1a1a1a);
    font-family: var(--dc-sans, "Roboto", system-ui, sans-serif);
    font-size: 0.93rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.tc-date-trigger i { color: var(--dc-maroon, #7a1e2e); font-size: 0.85rem; }
.tc-date-trigger:hover,
.tc-date-trigger[aria-expanded="true"] {
    border-color: var(--dc-maroon, #7a1e2e);
    background: #fff;
}
.tc-caret { margin-left: auto; font-size: 10px; opacity: 0.5; }

/* Hidden flatpickr anchor */
.tc-flatpickr-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Today button */
.tc-today-btn {
    flex-shrink: 0;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--dc-line, #d4c4a8);
    border-radius: 0;
    background: var(--dc-wash, #f5e6c8);
    color: var(--dc-navy, #12355b);
    font-family: var(--dc-sans, "Roboto", system-ui, sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    align-self: flex-end;
}
.tc-today-btn:hover {
    background: rgba(122, 30, 46, 0.08);
    color: var(--dc-maroon, #7a1e2e);
    border-color: var(--dc-maroon, #7a1e2e);
}

/* ── Error ── */
.tc-error {
    color: var(--color-bad, #b91c1c);
    font-size: 0.83rem;
    font-weight: 500;
    margin: 0 0 12px;
}

/* ── Submit button — full-width maroon ── */
.tc-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 0;
    background: var(--dc-maroon, #7a1e2e);
    color: var(--dc-cream, #fffdf6);
    font-family: var(--dc-sans, "Roboto", system-ui, sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s;
}
.tc-submit-btn:hover  { background: var(--dc-burgundy-dark, #611723); }
.tc-submit-btn:active { opacity: 0.88; }
.tc-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────
   RESULT SECTION
───────────────────────────────────────────────────── */
.tc-result-section { margin-bottom: 28px; }
.tc-result-section--hidden { display: none !important; }

/* ─────────────────────────────────────────────────────
   RESULT CARD  — identity + two-panel layout
───────────────────────────────────────────────────── */

/* Outer card */
.tc-rc {
    border: 1px solid var(--dc-line, #d4c4a8);
    background: var(--dc-card, #fffdf6);
    overflow: hidden;
}

/* ── Maroon date header ── */
.tc-rc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    background: var(--dc-maroon, #7a1e2e);
}
.tc-rc-head__date {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    color: #fffdf6;
    letter-spacing: 0.03em;
}
.tc-rc-head__day {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,253,246,0.65);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Info grid — label heading + value, 3 columns ── */
.tc-rc-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.tc-rc-info-cell {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-right: 1px solid var(--dc-line, #d4c4a8);
    border-bottom: 1px solid var(--dc-line, #d4c4a8);
}
.tc-rc-info-cell:nth-child(3n) { border-right: none; }
.tc-rc-info-cell:nth-last-child(-n+3) { border-bottom: none; }

.tc-rc-info-label {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--dc-mute, #5c5346);
}
.tc-rc-info-value {
    font-family: var(--dc-display, "Laila", Georgia, serif);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--dc-ink, #1a1a1a);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Nature colour on the value */
.tc-rc-info-value--very_auspicious { color: #92400e; }
.tc-rc-info-value--auspicious      { color: #166534; }
.tc-rc-info-value--neutral         { color: #374151; }
.tc-rc-info-value--inauspicious    { color: #991b1b; }
.tc-rc-info-value i { font-size: 0.85rem; }

/* ── Two-panel: good | avoid ── */
.tc-rc-acts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--dc-line, #d4c4a8);
}
.tc-acts-col {
    padding: 16px 18px 18px;
}
.tc-acts-col:first-child {
    border-right: 1px solid var(--dc-line, #d4c4a8);
}
.tc-acts-col__head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-bottom: 9px;
    margin-bottom: 10px;
    border-bottom: 2px solid;
}
.tc-acts-col__head i { font-size: 0.85rem; }
.tc-acts-col--good  .tc-acts-col__head { color: #166534; border-color: #166534; }
.tc-acts-col--avoid .tc-acts-col__head { color: var(--dc-maroon, #7a1e2e); border-color: var(--dc-maroon, #7a1e2e); }

/* Activity list — icon-prefixed items */
.tc-acts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.tc-acts-list li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--dc-ink, #1a1a1a);
}
.tc-acts-list li i {
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 0.7rem;
}
.tc-acts-list--good  li i { color: #166534; }
.tc-acts-list--avoid li i { color: var(--dc-maroon, #7a1e2e); }

/* ── Footer strip ── */
.tc-rc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid var(--dc-line, #d4c4a8);
    background: var(--dc-wash, #f5e6c8);
    flex-wrap: wrap;
}
.tc-rc-foot__note {
    font-family: var(--dc-sans, "Roboto", sans-serif);
    font-size: 0.72rem;
    color: var(--dc-mute, #5c5346);
}

.tc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    height: 30px;
    border: 1px solid var(--dc-line, #d4c4a8);
    border-radius: 0;
    background: var(--dc-card, #fffdf6);
    color: var(--dc-navy, #12355b);
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--dc-sans, "Roboto", sans-serif);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tc-action-btn:hover {
    border-color: var(--dc-maroon, #7a1e2e);
    color: var(--dc-maroon, #7a1e2e);
    background: rgba(122,30,46,0.05);
}

/* ─────────────────────────────────────────────────────
   INFO SECTIONS  (section head strip pattern)
───────────────────────────────────────────────────── */
.tc-section {
    background: var(--color-paper, #fff);
    border: 1px solid var(--dc-line, #d4c4a8);
    margin-bottom: 28px;
    overflow: hidden;
}

.tc-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--dc-line, #d4c4a8);
    background: var(--dc-wash, #f5e6c8);
}
.tc-section__head i {
    font-size: 1rem;
    color: var(--dc-maroon, #7a1e2e);
    flex-shrink: 0;
}
.tc-section__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dc-ink, #1a1a1a);
    margin: 0;
    letter-spacing: -0.01em;
}
.tc-section__body {
    padding: 24px 24px 20px;
}
.tc-section__body p {
    font-size: 0.88rem;
    color: var(--dc-mute, #5c5346);
    line-height: 1.75;
    margin: 0 0 12px;
}
.tc-section__body p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────
   ALL 30 TITHIS GRID
───────────────────────────────────────────────────── */
.tc-paksha-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tc-paksha-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}
.tc-paksha-title--shukla  { color: #92400e; border-color: #b45309; }
.tc-paksha-title--krishna { color: #4c1d95; border-color: #6d28d9; }

.tc-tlist { display: flex; flex-direction: column; gap: 2px; }
.tc-titem {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    transition: background 0.12s;
}
.tc-titem:hover { background: var(--dc-wash, #f5e6c8); }

.tc-tnum {
    width: 22px; height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.66rem;
    font-weight: 800;
    color: #fff;
}
.tc-tnum--shukla   { background: #b45309; }
.tc-tnum--krishna  { background: #6d28d9; }
.tc-tnum--special  { background: var(--color-gold, #c9a227); }
.tc-tnum--amavasya { background: #374151; }

.tc-tname { font-size: 0.82rem; font-weight: 600; color: var(--dc-ink, #1a1a1a); flex: 1; }
.tc-talt  { font-size: 0.72rem; color: var(--dc-soft, #7a7162); }
.tc-tnature { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tc-tnature--very_auspicious { background: var(--color-gold, #c9a227); }
.tc-tnature--auspicious      { background: var(--color-good, #1e6b3a); }
.tc-tnature--neutral         { background: #9ca3af; }
.tc-tnature--inauspicious    { background: var(--color-bad, #b91c1c); }

/* Nature legend */
.tc-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--dc-line, #d4c4a8);
}
.tc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--dc-mute, #5c5346);
}
.tc-legend-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ─────────────────────────────────────────────────────
   FAQ ACCORDION
───────────────────────────────────────────────────── */
.tc-faq { display: flex; flex-direction: column; }
.tc-faq details {
    border-bottom: 1px solid var(--dc-line, #d4c4a8);
}
.tc-faq details:last-child { border-bottom: none; }
.tc-faq summary {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dc-ink, #1a1a1a);
    cursor: pointer;
    list-style: none;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color 0.15s;
}
.tc-faq summary:hover { color: var(--dc-maroon, #7a1e2e); }
.tc-faq summary::-webkit-details-marker { display: none; }
.tc-faq summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.68rem;
    color: var(--dc-soft, #7a7162);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.tc-faq details[open] summary::after { transform: rotate(180deg); }
.tc-faq details[open] summary { color: var(--dc-maroon, #7a1e2e); }
.tc-faq details p {
    font-size: 0.86rem;
    color: var(--dc-mute, #5c5346);
    line-height: 1.75;
    padding-bottom: 16px;
    margin: 0;
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tithi-page .main-content { padding: 0 16px 60px; }
    .tc-page-head { padding: 28px 0 24px; }
    .tc-form-card { max-width: 100%; }
    .tc-section__body { padding: 18px 16px; }
    .tc-section__head { padding: 14px 16px; }
    .tc-paksha-wrap { grid-template-columns: 1fr; gap: 24px; }
    .tc-rc-info-cell { padding: 12px 14px; }
    .tc-acts-col { padding: 14px 14px 16px; }
    .tc-rc-foot { padding: 10px 14px; }
}

@media (max-width: 480px) {
    /* Collapse info to 2 columns on small phones */
    .tc-rc-info { grid-template-columns: repeat(2, 1fr); }
    .tc-rc-info-cell:nth-child(3n) { border-right: 1px solid var(--dc-line, #d4c4a8); }
    .tc-rc-info-cell:nth-child(2n) { border-right: none; }
    .tc-rc-info-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--dc-line, #d4c4a8); }
    .tc-rc-info-cell:nth-last-child(-n+2) { border-bottom: none; }
    /* Stack the two activity panels vertically */
    .tc-rc-acts { grid-template-columns: 1fr; }
    .tc-acts-col:first-child { border-right: none; border-bottom: 1px solid var(--dc-line, #d4c4a8); }
    .tc-rc-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}
