/* HosurOnline Marriage Timing, Delay & Relationship 30-Page Engine */
@font-face { font-family: 'Noto Sans Tamil'; src: url('../fonts/NotoSansTamil-Regular.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Noto Sans Tamil'; src: url('../fonts/NotoSansTamil-Bold.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }

.ho-mt-form-card {
    background: #fffdf9;
    border: 1px solid #ead9b5;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 12px;
}
.ho-mt-form-card label.font18 {
    display: block;
    font-weight: 700;
    color: #7c1d1d;
    margin-bottom: 6px;
}
.ho-mt-row-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ho-mt-row-inline select {
    flex: 1 1 90px;
    min-width: 80px;
}
.ho-mt-toolbar {
    position: sticky;
    top: 8px;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #7c1d1d;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 14px 0 18px;
    box-shadow: 0 4px 14px rgba(124, 29, 29, 0.2);
}
.ho-mt-toolbar select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ead9b5;
    color: #1f2937;
    background: #ffffff;
    font-size: 13px;
}
.ho-mt-print-btn {
    background: #f59e0b;
    color: #1f2937;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13.5px;
}
.ho-mt-print-btn:hover {
    background: #fbbf24;
}

/* Report Page Containers (Screen Preview) */
#hororeport {
    font-family: 'Noto Sans Tamil', system-ui, -apple-system, sans-serif;
    color: #1f2937;
    line-height: 1.55;
}
.report-page {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 22px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #7c1d1d;
    padding-bottom: 8px;
    margin-bottom: 14px;
    gap: 12px;
}
.rp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rp-page-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    background: #7c1d1d;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    border-radius: 6px;
    padding: 0 6px;
}
.rp-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #7c1d1d;
}
.rp-header-brand {
    font-size: 12px;
    font-weight: 700;
    color: #9a3412;
    white-space: nowrap;
}
.rp-body {
    flex: 1 1 auto;
}
.rp-footer {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
}

/* Cover */
.rp-cover-banner {
    background: linear-gradient(135deg, #7c1d1d 0%, #991b1b 60%, #b45309 100%);
    color: #ffffff;
    padding: 24px 22px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
}
.rp-cover-brand {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #fde68a;
    margin-bottom: 6px;
}
.rp-cover-title {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
}
.rp-cover-sub {
    margin: 0;
    font-size: 13px;
    color: #fef3c7;
}
.rp-greeting-box {
    background: #fffbeb;
    border-left: 4px solid #b45309;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}
.rp-greeting-box p { margin: 4px 0 0; }

/* Cards, Grids, Tables */
.rp-card, .rp-mini-card {
    background: #fffdf9;
    border: 1px solid #ead9b5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.rp-subhead {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: #7c1d1d;
}
.rp-mini-card h4 {
    margin: 0 0 5px;
    font-size: 13.5px;
    font-weight: 800;
    color: #7c1d1d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.rp-mini-card p { margin: 0 0 4px; font-size: 12.8px; }
.rp-small-muted { font-size: 12px !important; color: #4b5563; }
.rp-stack { display: flex; flex-direction: column; gap: 8px; }
.rp-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}
.rp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.rp-kpi-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-kpi-card {
    background: #fdf8ee;
    border: 1px solid #ead9b5;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
.rp-kpi-label { font-size: 11px; color: #6b7280; font-weight: 700; }
.rp-kpi-val { font-size: 18px; font-weight: 800; color: #7c1d1d; margin: 4px 0; }
.rp-kpi-sm { font-size: 13.5px; }
.rp-kpi-note { font-size: 10.5px; color: #374151; }

.rp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 12.2px;
}
.rp-table th, .rp-table td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}
.rp-table thead th {
    background: #fdf8ee;
    color: #7c1d1d;
    font-weight: 800;
}
.rp-kv-table th {
    background: #fdf8ee;
    color: #7c1d1d;
    width: 24%;
    font-weight: 700;
}
.rp-compact-table th, .rp-compact-table td {
    padding: 4.5px 6px;
    font-size: 11.4px;
}
.rp-row-active {
    background: #fef3c7 !important;
}

/* Badges & Callouts */
.rp-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}
.rp-badge-green { background: #dcfce7; color: #166534; }
.rp-badge-amber { background: #fef3c7; color: #92400e; }
.rp-badge-red { background: #fee2e2; color: #991b1b; }
.rp-badge-gray { background: #f3f4f6; color: #374151; }
.rp-score-pill {
    background: #7c1d1d;
    color: #ffffff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}
.rp-callout {
    background: #f8fafc;
    border-left: 4px solid #7c1d1d;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12.5px;
}
.rp-callout-good { background: #f0fdf4; border-left-color: #15803d; }
.rp-callout-warn { background: #fff7ed; border-left-color: #ea580c; }
.rp-blessing-box {
    background: linear-gradient(135deg, #fdf8ee 0%, #fef3c7 100%);
    border: 1.5px solid #d97706;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
    font-weight: 700;
    color: #7c1d1d;
    margin-top: 14px;
}

/* Inline SVG Containers */
.rp-chart-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 12px 0;
}
.rp-chart-box svg,
.ho-svg-chart,
.ho-svg-bars,
.ho-svg-timeline,
.ho-svg-meter,
.ho-svg-sav {
    width: 100%;
    height: auto;
    display: block;
}
.ho-svg-gauge {
    max-width: 310px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}
.rp-svg-wrap { margin: 8px 0 12px; }
.rp-svg-center { text-align: center; }
.rp-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-list { margin: 4px 0 0 18px; padding: 0; font-size: 12.6px; }
.rp-spacious-list li { margin-bottom: 8px; }
.rp-lead { font-size: 12.8px; margin: 0 0 10px; color: #374151; }
.rp-guidance { font-size: 12.4px; color: #1f2937; margin: 8px 0 0; }
.rp-legend-note, .rp-meta-footnote { font-size: 11px; color: #6b7280; margin: 6px 0 0; text-align: center; }

@media (max-width: 760px) {
    .rp-kpi-grid, .rp-two-col, .rp-chart-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Strict A4 Paged Media Print Isolation inside Host Layout */
@page {
    size: A4 portrait;
    margin: 14mm 14mm 16mm 14mm;
}

@media print {
    body.horoscope-printing .ho-topbar-strip,
    body.horoscope-printing > header,
    body.horoscope-printing .ho-breadcrumb-bar,
    body.horoscope-printing .ho-sidebar-stack,
    body.horoscope-printing > footer,
    body.horoscope-printing .no-print {
        display: none !important;
    }
    body.horoscope-printing * {
        visibility: hidden !important;
    }
    body.horoscope-printing #hororeport,
    body.horoscope-printing #hororeport * {
        visibility: visible !important;
    }
    body.horoscope-printing #hororeport {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.horoscope-printing .report-page {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 263mm;
        max-height: 267mm;
        page-break-after: always;
        break-after: page;
        overflow: hidden;
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
    }
    body.horoscope-printing .report-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }
    body.horoscope-printing .rp-chart-pair,
    body.horoscope-printing .rp-two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body.horoscope-printing .rp-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    body.horoscope-printing .rp-kpi-two {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-family: 'Noto Sans Tamil', system-ui, sans-serif;
        font-size: 10pt;
        line-height: 1.5;
    }
}

/* ---------- Branding: header icon, footer site name ---------- */
.rp-header-brand { display: inline-flex; align-items: center; gap: 6px; }
.rp-brand-icon { width: 18px; height: 18px; object-fit: contain; }
.rp-footer-site { font-weight: 700; color: #9a3412; }

/* ---------- Cover ---------- */
.rp-cover-top { display: flex; justify-content: space-between; align-items: center; }
.rp-cover-invocation { font-weight: 800; color: #9a3412; font-size: 13px; letter-spacing: .5px; }
.rp-cover-logo { height: 46px; width: auto; }
.rp-cover-emblem { margin: 0 auto; max-width: 104mm; }
.rp-cover-emblem svg { width: 100%; height: auto; display: block; }
.rp-cover-page .rp-cover-banner { margin-top: 4px; text-align: center; }
.rp-contact { text-align: center; margin-top: 10px; padding-top: 8px; border-top: 2px solid #e9b949; }
.rp-wordmark { height: 26px; width: auto; margin: 0 auto 4px; display: block; }
.rp-contact-lines { font-size: 11.5px; color: #374151; line-height: 1.6; }
.rp-contact-card { margin-top: 10px; border: 1px solid #ead9b5; border-radius: 10px; padding: 8px 12px; background: #fffdf9; }

/* ---------- Interpretation ("What this means for you") ---------- */
.rp-interp { margin-top: 12px; padding: 10px 14px; background: #fffbeb; border: 1px solid #f3dfa2; border-left: 4px solid #b45309; border-radius: 8px; font-size: 12.4px; line-height: 1.6; color: #1f2937; }
.rp-interp p { margin: 0 0 6px; }
.rp-interp p:last-child { margin-bottom: 0; }
.rp-interp-head { font-weight: 800; color: #7c1d1d; font-size: 13px; margin-bottom: 6px; }
.rp-interp-sub { font-weight: 700; color: #9a3412; margin: 6px 0 2px; }
.rp-interp-list { margin: 2px 0 6px 18px; padding: 0; }
.rp-interp-list li { margin-bottom: 3px; }
.rp-two-col-list { columns: 2; column-gap: 18px; }
.rp-interp b { color: #7c1d1d; }

/* Fit levels set by hoFitPages() when a page is too full for one A4 sheet */
.report-page.rp-fit-1 .rp-interp, .report-page.rp-fit-1 .rp-table { font-size: 11.4px; }
.report-page.rp-fit-2 .rp-interp, .report-page.rp-fit-2 .rp-table { font-size: 10.6px; line-height: 1.45; }
.report-page.rp-fit-3 .rp-interp, .report-page.rp-fit-3 .rp-table { font-size: 9.8px; line-height: 1.38; }
.report-page .rp-opt.rp-fit-hidden { display: none; }

/* Measuring mode: screen layout identical to the printed A4 content box */
body.ho-print-measure #hororeport .report-page { width: 182mm; height: 267mm; max-height: 267mm; padding: 0; border: 0; box-shadow: none; overflow: hidden; margin: 0 0 10mm; }
body.ho-print-measure .rp-chart-pair, body.ho-print-measure .rp-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body.ho-print-measure .rp-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
body.ho-print-measure .rp-kpi-two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media print {
    body.horoscope-printing .report-page { height: 267mm; }
    .rp-interp { break-inside: auto; }
}

/* Compact cover so it fits one A4 sheet */
.rp-cover-page .rp-cover-banner { padding: 12px 18px; margin: 4px 0 8px; }
.rp-cover-page .rp-cover-title { margin: 4px 0; }
.rp-cover-page .rp-greeting-box { padding: 8px 12px; margin-bottom: 8px; }
.rp-cover-page .rp-card { padding: 8px 12px; margin-bottom: 8px; }
.rp-cover-page .rp-kpi-grid { margin-bottom: 4px; }
.report-page.rp-fit-1 .rp-cover-emblem { max-width: 96mm; }
.report-page.rp-fit-2 .rp-cover-emblem { max-width: 88mm; }
.report-page.rp-fit-3 .rp-cover-emblem { max-width: 78mm; }
.report-page.rp-fit-2 .rp-greeting-box, .report-page.rp-fit-2 .rp-kpi-note { font-size: 11.6px; }
.report-page.rp-fit-3 .rp-greeting-box, .report-page.rp-fit-3 .rp-kpi-note { font-size: 11px; }
