/* ──────────────────────────────────────────────────────────────────
   hypo-assistant.css — Hypotekárny asistent (self-contained styles)
   ────────────────────────────────────────────────────────────────── */

/* Shell wrapper */
.ha-shell {
    max-width: 900px;
}

/* ── Step indicator ── */
.ha-step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ha-step-pill {
    padding: 7px 20px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    background: #f0f0f0;
    color: #888;
    transition: background .2s, color .2s;
}

.ha-step-pill.active {
    background: #111;
    color: #fff;
}

.ha-step-pill.done {
    background: #f4f5f7;
    color: #555;
}

.ha-step-divider {
    color: #ccc;
    font-size: 1rem;
}

/* ── Form ── */
.ha-form-step {
    animation: slideUp .25s ease-out;
}

.ha-step-title {
    margin: 0 0 20px;
    font-size: 1rem;
    font-weight: 800;
    color: #111;
}

/* ── Segmented control ── */
.ha-segmented {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ha-seg-btn {
    padding: 9px 18px;
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    font-family: inherit;
}

.ha-seg-btn:hover {
    border-color: #999;
}

.ha-seg-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ── Navigation row ── */
.ha-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
}

/* ── Buttons ── */
.ha-btn-primary {
    padding: 11px 28px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s;
}

.ha-btn-primary:hover { opacity: .85; }

.ha-btn-secondary {
    padding: 11px 22px;
    background: #fff;
    color: #111;
    border: 1.5px solid var(--border-color, #e5e7eb);
    border-radius: 7px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s;
}

.ha-btn-secondary:hover { border-color: #999; }

/* ── Report ── */
.ha-report-header {
    background: #111;
    color: #fff;
    border-radius: 10px;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ha-report-section {
    margin-bottom: 20px !important;
    animation: slideUp .3s ease-out;
}

/* ── Report rows ── */
.ha-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .92rem;
}

.ha-row:last-of-type { border-bottom: none; }

.ha-row-label {
    color: #555;
    flex-shrink: 0;
    max-width: 55%;
}

.ha-row-value {
    text-align: right;
    font-weight: 600;
    color: #111;
}

/* ── Fixation table ── */
.ha-row-highlight td {
    font-weight: 700;
    background: #f4f5f7;
}

table td, table th {
    padding: 8px 10px;
    text-align: right;
}

table td:first-child, table th:first-child {
    text-align: left;
}

table tr {
    border-bottom: 1px solid #f0f0f0;
}

/* ── Disclaimer ── */
.ha-disclaimer {
    font-size: .78rem;
    color: #999;
    font-style: italic;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Print ── */
@media print {
    body > *:not(#app):not(.main-content) { display: none !important; }
    .sidebar, nav, header, .ha-report-header button,
    #ha-btn-edit, #ha-btn-print,
    .ha-step-indicator, .ha-form-step { display: none !important; }
    #ha-report { display: block !important; }
    .panel { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ──────────────────────────────────────────────────────────────────
   NEW: REDESIGN LAYOUTS (Refine & Mortgage Architect)
   ────────────────────────────────────────────────────────────────── */

/* Refine Design (Refinancovanie) */
.refine-layout {
    font-family: 'Inter', sans-serif;
    color: #111;
    background: #fff;
    padding: 0;
}

.refine-header {
    margin-bottom: 40px;
}

.refine-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
    color: #111;
    line-height: 1.1;
}

.refine-desc {
    font-size: 1.05rem;
    color: #666;
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}

.refine-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

.refine-left-panel {
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

.refine-panel-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 32px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 16px;
    color: #333;
}

.refine-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.refine-input-group {
    display: flex;
    flex-direction: column;
}

.refine-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.refine-input-wrapper {
    position: relative;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 4px;
    transition: border-color 0.2s;
}

.refine-input-wrapper:focus-within {
    border-color: #111;
}

.refine-input {
    border: none;
    outline: none;
    font-size: 1.4rem;
    font-weight: 600;
    color: #111;
    width: 100%;
    background: transparent;
    padding: 0;
}

.refine-input.with-suffix {
    padding-right: 24px;
}

.refine-suffix {
    position: absolute;
    right: 0;
    bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #111;
    pointer-events: none;
}

.refine-btn {
    background: #111;
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.refine-btn:hover {
    background: #000;
}

.refine-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.refine-dark-box {
    background: #000;
    color: #fff;
    padding: 40px 32px;
}

.refine-dark-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: block;
}

.refine-dark-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 24px 0;
    line-height: 1;
}

.refine-dark-divider {
    border-top: 1px solid #333;
    margin: 0 0 24px 0;
}

.refine-savings-badge {
    display: inline-block;
    background: #fff;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 10px;
    margin-top: -8px;
}

.refine-light-box {
    border: 1px solid #eaeaea;
    padding: 24px;
    background: #fafafa;
}

.refine-light-box-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 20px 0;
}

.refine-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.refine-breakdown-row.total {
    border-top: 1px solid #eaeaea;
    padding-top: 16px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.refine-row-label {
    color: #666;
    max-width: 60%;
}

.refine-row-value {
    font-weight: 600;
    text-align: right;
}

.refine-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.refine-info-card {
    border: 1px solid #eaeaea;
    padding: 24px;
}

.refine-info-icon {
    margin-bottom: 16px;
}

.refine-info-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.refine-info-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Mortgage Architect Design (Hypotekárny asistent) */
.architect-layout {
    font-family: 'Inter', sans-serif;
    color: #111;
}

.architect-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #aaa;
}

.architect-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.architect-step.active {
    color: #111;
}

.architect-step-num {
    background: #f4f4f4;
    padding: 4px 8px;
}

.architect-step.active .architect-step-num {
    background: #000;
    color: #fff;
}

.architect-line {
    width: 40px;
    height: 1px;
    background: #eaeaea;
}

.architect-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    letter-spacing: -0.04em;
    line-height: 1;
}

.architect-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0 0 40px 0;
    max-width: 500px;
    line-height: 1.6;
}

.architect-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
}

.architect-left {
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

.architect-form-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 32px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 16px;
    color: #333;
}

.architect-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.architect-inputs-row.full {
    grid-template-columns: 1fr;
}

.architect-fixation-grid {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.architect-fix-btn {
    border: 1px solid #ddd;
    background: #fff;
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.architect-fix-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.architect-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.architect-dark-box {
    background: #000;
    color: #fff;
    padding: 40px;
}

.architect-image-box {
    width: 100%;
    height: 200px;
    background: url('../images/architect-building.png') center/cover no-repeat;
    background-color: #222;
}

.architect-ltv-value {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    margin: 24px 0 16px 0;
    letter-spacing: -0.04em;
}

.architect-ltv-desc {
    font-size: 0.6rem;
    color: #aaa;
    text-transform: uppercase;
    line-height: 1.6;
    letter-spacing: 0.1em;
}

.architect-note-section {
    grid-column: 1 / -1;
    margin-top: 40px;
    border-top: 1px solid #111;
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════
   HYPOTÉKY — RESPONSIVE ADDITIONS
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1100px: Stack 2-stĺpcové gridy na 1 stĺpec (tablet so sidebarom)
   Matematika: 1100 - 260px sidebar - 96px padding = 744px;
   refine-grid (1fr 360px + 40px gap) → left panel len 344px → po 80px paddingu = 264px
   → formulárové stĺpce len ~112px každý — príliš úzke pre number inputy.
   Riešenie: stacking od 1100px.                                          ── */
@media (max-width: 1100px) {
    .refine-grid,
    .architect-grid {
        grid-template-columns: 1fr;
    }

    .refine-right-panel,
    .architect-right {
        max-width: 640px;
    }

    .refine-dark-box,
    .architect-dark-box {
        padding: 32px 24px;
    }
}

/* ── Sub-tab navigácia: viditeľná a horizontálne scrollovateľná na mobile.
   ID selektor (#hypoSubTabs) má vyššiu špecificitu ako trieda (.pf-nav-tabs)
   z portfolio.css (display:none na 768px), takže tieto pravidlá vyhrávajú.
   display:flex !important je potrebný na prekonanie inline display:none. ── */
@media (max-width: 768px) {
    #hypoSubTabs {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        border-radius: 0;
        box-shadow: inset 0 -1px 0 #eaeaea;
        background: #fff;
        border: none;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        margin-top: 0;
        margin-bottom: 16px;
        padding: 0;
    }

    #hypoSubTabs::-webkit-scrollbar {
        display: none;
    }

    #hypoSubTabs .pf-nav-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        justify-content: center;
        text-align: center;
        width: auto;
        padding: 12px 16px;
        font-size: 0.8rem;
        border-bottom: none;
        box-shadow: none;
    }

    #hypoSubTabs .pf-nav-tab.active {
        box-shadow: inset 0 -3px 0 #111;
        background: transparent;
    }
}

/* ── 768px: Kompletné mobilné pravidlá pre Refinancovanie a Kalkulátor bonity ── */
@media (max-width: 768px) {

    /* ─── Refinancovanie ─── */
    .refine-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .refine-left-panel {
        padding: 16px;
    }

    .refine-form-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 24px;
    }

    .refine-info-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 24px;
    }

    .refine-dark-box {
        padding: 20px 16px;
    }

    .refine-dark-value {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }

    /* ─── Kalkulátor bonity (Architect) ─── */
    .architect-title {
        font-size: 1.8rem;
        letter-spacing: -0.02em;
    }

    .architect-left {
        padding: 16px;
    }

    .architect-inputs-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .architect-dark-box {
        padding: 20px 16px;
    }

    .architect-ltv-value {
        font-size: 3rem;
        margin: 16px 0 12px 0;
    }

    .architect-note-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* ─── HA navigačné tlačidlá: stack na mobile ─── */
    .ha-nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ha-nav-row .ha-btn-primary,
    .ha-nav-row .ha-btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* ─── Fixačná tabuľka — min-width pre horizontálny scroll ───
       JS buildSection5 wrappuje tabuľku v <div style="overflow-x:auto">.
       min-width zabezpečí, že tabuľka sa správne scrolluje.       ─── */
    .ha-report-section table {
        min-width: 380px;
    }

    /* ─── Step indicator: zalamovanie na úzkych obrazovkách ─── */
    .ha-step-indicator {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ─── Report header na mobile ─── */
    .ha-report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ── 600px: Extra malé telefóny ── */
@media (max-width: 600px) {
    .refine-title {
        font-size: 1.3rem;
    }

    .refine-dark-value {
        font-size: 1.5rem;
    }

    .architect-title {
        font-size: 1.5rem;
    }

    .architect-ltv-value {
        font-size: 2.4rem;
    }

    #hypoSubTabs .pf-nav-tab {
        font-size: 0.72rem;
        padding: 10px 12px;
    }
}

