/* ── South Indian Horoscope Charts (Rasi / Amsam) ─────────────────────────── */

.hc-wrap {
    margin-top: 1.25rem;
    padding: 1.25rem 1rem 1rem;
    background: linear-gradient(180deg, #fffefb 0%, #faf8f4 100%);
    border: 1px solid rgba(106, 46, 36, 0.12);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(42, 24, 16, 0.06);
}

.hc-dasa {
    text-align: center;
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
    font-size: 0.92rem;
    color: #3d5c45;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.hc-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.hc-chart {
    min-width: 0;
}

.hc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    aspect-ratio: 1;
    border: 2px solid #4a7c59;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.hc-cell {
    border: 1px solid #6b9b7a;
    padding: 4px 3px;
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
    font-size: clamp(0.55rem, 1.8vw, 0.72rem);
    line-height: 1.35;
    color: #2d5a3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    min-height: 0;
    background: #fff;
}

.hc-cell.hc-center {
    grid-column: 2 / span 2;
    grid-row: 2 / span 2;
    background: #f8fcf9;
    border: 1px solid #6b9b7a;
}

.hc-center-label {
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    font-weight: 600;
    color: #3d6b4f;
}

.hc-lagna-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 49%, #a8c9b4 49%, #a8c9b4 51%, transparent 51%);
    pointer-events: none;
    opacity: 0.55;
}

.hc-lagna {
    position: absolute;
    top: 3px;
    left: 4px;
    font-weight: 700;
    font-size: 0.85em;
    color: #6a2e24;
    z-index: 1;
}

.hc-planets {
    position: relative;
    z-index: 1;
    word-break: break-word;
}

.hc-footer {
    text-align: center;
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
    font-size: 0.95rem;
    color: #4a7c59;
    margin: 1rem 0 0;
    font-weight: 500;
}

.hc-parse-note {
    text-align: center;
    font-size: 0.8rem;
    color: #8a6a3a;
    margin: 0.75rem 0 0;
    font-style: italic;
}

.hc-upload-preview {
    margin-bottom: 1rem;
    text-align: center;
}

.hc-source-img {
    max-width: 100%;
    max-height: 420px;
    border: 1px solid rgba(106, 46, 36, 0.15);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(42, 24, 16, 0.08);
    background: #fff;
}

.hc-upload-link {
    margin-bottom: 1rem;
    text-align: center;
}

.hc-upload-link a {
    color: var(--primary, #6a2e24);
    font-weight: 500;
}


.hc-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.hc-download-actions {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.hc-actions .btn-sm {
    font-size: 0.78rem;
}

.file-list-item .hc-mini-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e8f3ec;
    color: #3d6b4f;
    margin-left: 0.35rem;
}

.file-list-item .hc-mini-badge.partial { background: #fff8e6; color: #8a6a3a; }
.file-list-item .hc-mini-badge.failed  { background: #fdecea; color: #a04040; }
.file-list-item .hc-mini-badge.manual  { background: #e8f0fa; color: #3d5a8a; }
.file-list-item .hc-mini-badge.computed { background: #e8f3ec; color: #2d6b4f; font-weight: 600; }

.hc-pdf-preview {
    width: 100%;
    height: min(480px, 60vh);
    border: 1px solid rgba(106, 46, 36, 0.15);
    border-radius: 10px;
    background: #fff;
}

.hc-profile-section {
    margin-top: 1rem;
}

.hc-edit-hint {
    font-size: 0.88rem;
    color: var(--text-light, #666);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.hc-edit-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.hc-edit-chart h4 {
    font-family: 'Noto Sans Tamil', sans-serif;
    color: #3d6b4f;
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.hc-edit-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.hc-edit-label {
    font-size: 0.75rem;
    color: var(--text-light, #777);
}

.hc-planet-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(106, 46, 36, 0.2);
    border-radius: 6px;
    font-family: 'Noto Sans Tamil', sans-serif;
    font-size: 0.85rem;
}

.hc-lagna-pick {
    font-family: 'Noto Sans Tamil', sans-serif;
    font-weight: 700;
    color: #6a2e24;
    white-space: nowrap;
    cursor: pointer;
}

@media (max-width: 720px) {
    .hc-edit-dual {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hc-dual {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

/* ── Birth details panel (profile horoscope section) ───────────────────────── */

.hc-birth-panel {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #fffefb 0%, #faf8f4 100%);
    border: 1px solid rgba(106, 46, 36, 0.14);
    border-radius: 12px;
}

.hc-birth-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6a2e24;
}

.hc-birth-hint {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: #8a6a3a;
    line-height: 1.45;
}

.hc-birth-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

.hc-birth-form .form-group {
    margin: 0;
}

.hc-birth-form .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text, #3d2a24);
    margin-bottom: 0.3rem;
}

.hc-birth-wide {
    grid-column: 1 / -1;
}

.hc-req {
    color: #c62828;
}

.hc-birth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.hc-birth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
}

.hc-birth-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-light, #8a7a72);
    margin-bottom: 0.15rem;
}

.hc-birth-field span {
    font-size: 0.9rem;
    color: var(--text, #3d2a24);
}

@media (max-width: 560px) {
    .hc-birth-form,
    .hc-birth-grid {
        grid-template-columns: 1fr;
    }
}
