/* ============================================================
   NVEST — Inflačná Kalkulačka (Inflation Time Machine)
   css/inflacia.css
   ============================================================ */

/* --- Rok OD a Rok DO v mriežke --- */
.years-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

/* --- Quickjump & Presets Buttons --- */
.quickjump-row,
.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.quickjump-btn,
.preset-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.32rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.quickjump-btn:hover,
.preset-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.quickjump-btn.active,
.preset-chip.active {
    background: var(--brand-red);
    color: #ffffff;
    border-color: var(--brand-red);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.45);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 0.45rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--brand-red);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Reset všeobecných štýlov inputov z formulára (padding/pozadie/rámik),
   ktoré na mobile (iOS Safari) zmenšia checkbox na nulovú veľkosť,
   a zákaz zmršťovania vo flex riadku pri dlhom texte na úzkej obrazovke */
.dashboard-sidebar .calculator-form .checkbox-label input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: auto;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    min-width: 1.1rem;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.checkbox-label span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}

.checkbox-label.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checkbox-label.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* --- Hlavný kontajner výsledkov (Rozostupy medzi panelmi) --- */
#inflaciaResultsWrapper,
.inflacia-results-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

#inflaciaResultsWrapper[style*="display: none"],
.inflacia-results-wrapper[style*="display: none"] {
    display: none !important;
}

/* --- TradingView / Interactive Brokers Integrovaný Bar --- */
.integrated-hypo-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.4rem;
    gap: 1.5rem;
    background: linear-gradient(180deg, rgba(28, 20, 24, 0.7) 0%, rgba(16, 16, 20, 0.85) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.integrated-hypo-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.1) 0%, transparent 75%);
    pointer-events: none;
}

.hypo-side-hero {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.side-badge-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.side-tag.tag-red {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-red);
    background: rgba(220, 38, 38, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid rgba(220, 38, 38, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.verdict-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.side-hero-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-val {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 3.8vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tv-delta-badge {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}

.tv-delta-badge.good {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.25);
}

.tv-delta-badge.neutral {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.hero-subtext {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.hero-subtext strong {
    color: var(--text-main);
}

.integrated-hypo-bar .verdict-micro-stats {
    margin-top: 0;
    min-width: 440px;
    flex: 0 1 auto;
}

/* 3 Kľúčové mini štatistiky (Segmentovaný FinTech Pás) */
.verdict-micro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    padding: 0;
}

.micro-stat-item {
    padding: 0.9rem 1.15rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    transition: background 0.2s ease;
}

.micro-stat-item:last-child {
    border-right: none;
}

.micro-stat-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.stat-tag-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-dot.red { background: #f87171; box-shadow: 0 0 6px rgba(248, 113, 113, 0.6); }
.stat-dot.amber { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.stat-dot.cyan { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.6); }

.micro-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.stat-main-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.stat-main-val.red { color: #f87171; }
.stat-main-val.amber { color: #fbbf24; }
.stat-main-val.cyan { color: #ffffff; }

.stat-pct-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    line-height: 1.2;
}

.stat-pct-badge.red { background: rgba(248, 113, 113, 0.12); color: #f87171; }
.stat-pct-badge.amber { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.stat-pct-badge.neutral { background: rgba(255, 255, 255, 0.08); color: #94a3b8; }
.stat-pct-badge.good { background: rgba(74, 222, 128, 0.12); color: #4ade80; }

.stat-footnote {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Visibility toggles for desktop vs mobile */
.lbl-short, .val-short {
    display: none;
}
.lbl-full, .val-full {
    display: inline;
}

/* Insight Callout */
.verdict-insight-callout {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--brand-red);
    padding: 0.75rem 1rem;
    border-radius: 0 10px 10px 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.verdict-insight-callout strong {
    color: var(--text-main);
}

/* --- What Things Will Cost (Goods Grid) --- */
.goods-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
}

.goods-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.goods-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.goods-note {
    margin: 0.85rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.good-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.good-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.good-emoji {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    display: block;
}

.good-name {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.good-now {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.good-future {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ff6b81;
}

.good-item.highlight-good {
    border-color: rgba(220, 38, 38, 0.45);
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
}

.good-item.highlight-good .good-future {
    color: #ffffff;
    font-size: 1.15rem;
}

.good-qty {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    line-height: 1.3;
}

.good-qty strong {
    color: var(--text-main);
}

/* --- Chart Toggle & Toolbar --- */
.chart-view-toggle {
    display: inline-flex;
    flex-wrap: nowrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.2rem;
    gap: 0.2rem;
    flex-shrink: 0;
}

.chart-view-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.chart-view-btn.active {
    background: var(--brand-red);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}

.chart-view-btn[data-view="cost"].active {
    background: var(--brand-red);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
}

.chart-view-btn[data-view="power"].active {
    background: #fbbf24;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.etf-label-mobile,
.savings-label-mobile {
    display: none;
}

.chart-card.hero-chart .integrated-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
}

.chart-card.hero-chart .chart-card-tabs {
    padding: 0 1.1rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-card.hero-chart .integrated-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.55rem 1.1rem;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .etf-label-desktop,
    .savings-label-desktop {
        display: none !important;
    }
    .etf-label-mobile,
    .savings-label-mobile {
        display: inline !important;
    }
    .chart-view-btn {
        font-size: 0.72rem;
        padding: 0.32rem 0.6rem;
    }
    .series-toggle {
        font-size: 0.72rem;
        padding: 0.32rem 0.65rem;
    }
    .chart-card.hero-chart .chart-card-tabs {
        padding: 0 0.75rem;
    }
    .chart-card.hero-chart .integrated-toolbar-actions {
        padding: 0.45rem 0.75rem;
        justify-content: space-between;
        width: 100%;
    }
}

/* Prepínač porovnania s ETF */
.series-toggles {
    display: inline-flex;
    gap: 0.4rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.series-toggle {
    --series-color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.series-toggle:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.series-toggle:focus-visible {
    outline: 2px solid var(--series-color);
    outline-offset: 2px;
}

.series-toggle .series-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--series-color);
    background: transparent;
    transition: background 0.2s ease;
}

.series-toggle.active {
    color: var(--text-main);
    border-color: var(--series-color);
    background: color-mix(in srgb, var(--series-color) 14%, transparent);
}

.series-toggle.active .series-dot {
    background: var(--series-color);
}

.series-toggle.series-savings { --series-color: #38bdf8; }
.series-toggle.series-etf { --series-color: #4ade80; }

.assumed-value {
    opacity: 0.6;
    font-style: italic;
}

.chart-data-note {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* --- Info ikonka s vysvetlením grafu (Popover) --- */
.chart-view-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.chart-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.chart-info-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chart-info-btn:hover,
.chart-info-btn:focus-visible,
.chart-info-wrapper.is-open .chart-info-btn {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.chart-info-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 340px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    text-align: left;
}

.chart-info-wrapper:hover .chart-info-popover,
.chart-info-wrapper:focus-within .chart-info-popover,
.chart-info-wrapper.is-open .chart-info-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.chart-info-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.55rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chart-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.74rem;
    line-height: 1.42;
    color: #cbd5e1;
}

.chart-info-list li strong {
    color: #f8fafc;
}

.info-dot {
    width: 16px;
    height: 3px;
    border-radius: 2px;
    margin-top: 0.55rem;
    flex-shrink: 0;
}

.info-dot.cost-dot { background: #f87171; }
.info-dot.power-dot { background: #fbbf24; }
.info-dot.savings-dot { background: #38bdf8; }
.info-dot.etf-dot { background: #4ade80; }

.chart-info-footer {
    font-size: 0.72rem;
    line-height: 1.42;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}

.chart-info-footer strong {
    color: #e2e8f0;
}

@media (max-width: 600px) {
    .chart-info-popover {
        left: -95px;
        width: min(300px, calc(100vw - 2.5rem));
    }
}

/* --- SEO Intro & Article Link --- */
.seo-intro-card {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.seo-article-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.95rem 1.25rem;
    border-radius: 12px;
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    transition: all 0.25s ease;
}

.seo-article-link:visited {
    color: var(--text-main) !important;
}

.seo-article-link:hover {
    background: rgba(230, 0, 0, 0.08);
    border-color: rgba(230, 0, 0, 0.4);
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(230, 0, 0, 0.2);
}

.seo-article-link strong {
    color: #ffffff;
    font-weight: 700;
}

.seo-article-link i {
    color: var(--brand-red);
    font-size: 1.05rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.seo-article-link:hover i {
    transform: scale(1.2);
}

/* --- Fix pre grafovú kartu a zabránenie prekrývaniu panelov na mobile --- */
.chart-card.hero-chart {
    height: auto !important;
    min-height: unset !important;
}

.chart-card-body {
    height: auto !important;
    min-height: unset !important;
    overflow: visible;
}

.chart-card-body canvas {
    position: static !important;
    inset: unset !important;
    width: 100% !important;
    height: 100% !important;
}

.chart-card-body .chart-container {
    width: 100%;
    position: relative;
}

@media (max-width: 900px) {
    .disclaimer-box {
        order: 4;
        width: 100%;
    }
}

@media (max-width: 1050px) {
    .integrated-hypo-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .integrated-hypo-bar .verdict-micro-stats {
        width: 100%;
        min-width: 0;
    }

    .hypo-mobile-action {
        display: flex;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    #inflaciaResultsWrapper,
    .inflacia-results-wrapper {
        gap: 1.15rem;
    }

    .chart-card-body {
        padding: 1rem 0.75rem;
    }

    .chart-card-body .chart-container {
        padding: 0.75rem 0.5rem;
        height: 340px !important;
    }

    .integrated-hypo-bar {
        padding: 1rem 0.85rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .integrated-hypo-bar .verdict-micro-stats {
        width: 100%;
        min-width: 0;
        margin-top: 0.25rem;
    }

    .hypo-mobile-action {
        display: flex;
        margin-top: 0.25rem;
    }

    .chart-card-body .verdict-insight-callout {
        margin-top: 1rem;
    }

    .verdict-micro-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0 !important;
        border-radius: 12px;
        margin-top: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .micro-stat-item {
        padding: 0.6rem 0.25rem;
        text-align: center;
        align-items: center;
        box-sizing: border-box;
    }

    .stat-tag-row {
        justify-content: center;
        gap: 0.25rem;
        margin-bottom: 0.2rem;
    }

    .stat-dot {
        width: 5px;
        height: 5px;
    }

    .micro-stat-label {
        font-size: 0.62rem;
        justify-content: center;
        white-space: nowrap;
    }

    .stat-main-val {
        font-size: 0.95rem;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
        white-space: nowrap;
    }

    .stat-pct-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }

    .stat-pct-badge.neutral,
    .stat-pct-badge.amber {
        display: none !important;
    }

    .stat-footnote {
        display: none !important;
    }

    .lbl-full, .val-full {
        display: none !important;
    }

    .lbl-short, .val-short {
        display: inline !important;
    }

    .goods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .verdict-main-amount {
        font-size: 2.2rem;
    }
}

@media (max-width: 380px) {
    .micro-stat-item {
        padding: 0.5rem 0.25rem;
    }
    .stat-main-val {
        font-size: 0.9rem;
    }
    .micro-stat-label {
        font-size: 0.58rem;
    }
}
