/* Kalkulator inflacji — layout */

.pbn-tool-kalkulator-inflacji .pbn-tool-ui {
    max-width: 560px;
    margin: 0 auto;
}

/* Context banner */
.ki-context {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color, #4f46e5);
    border-radius: var(--radius-sm, 4px);
    background: rgba(79, 70, 229, 0.05);
}

.ki-context-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary-color, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
}

.ki-context-text {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
}

/* Form */
.ki-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ki-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ki-row:first-child {
    grid-template-columns: 1fr;
}

.ki-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ki-label {
    font-weight: 600;
    font-size: 0.9em;
}

.ki-form input[type="number"],
.ki-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: var(--radius-sm, 4px);
    background: transparent;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

.ki-submit {
    width: 100%;
    padding: 0.75rem;
    border: 0;
    border-radius: var(--radius-sm, 4px);
    background: var(--primary-color, #4f46e5);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ki-submit:hover {
    opacity: 0.85;
}

/* Error */
.ki-error {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm, 4px);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    font-size: 0.9em;
}

.ki-error[hidden] {
    display: none;
}

/* Results */
.ki-results {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.ki-results[hidden] {
    display: none;
}

/* Hero */
.ki-hero {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #eee);
}

.ki-hero-amount {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color, #4f46e5);
}

.ki-hero-desc {
    margin: 0.5rem 0 0;
    font-size: 0.9em;
    opacity: 0.7;
}

/* Stats */
.ki-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ki-stat {
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: var(--radius-sm, 4px);
}

.ki-stat-label {
    display: block;
    font-size: 0.8em;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.ki-stat-value {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
}

/* Section title */
.ki-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

/* Year-by-year table */
.ki-breakdown {
    margin-bottom: 1.5rem;
}

.ki-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.ki-table th,
.ki-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #eee);
}

.ki-table th {
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.7;
}

.ki-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* Info */
.ki-info {
    margin: 0;
    padding: 0.75rem;
    border-radius: var(--radius-sm, 4px);
    background: rgba(79, 70, 229, 0.04);
    font-size: 0.8em;
    line-height: 1.5;
    opacity: 0.7;
}

/* Navigation */
.ki-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ki-nav-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--radius-sm, 4px);
    text-decoration: none;
    color: inherit;
    font-size: 0.85em;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}

.ki-nav-link:hover {
    border-color: var(--primary-color, #4f46e5);
    background: rgba(79, 70, 229, 0.04);
}

/* Responsive */
@media (max-width: 600px) {
    .ki-row {
        grid-template-columns: 1fr;
    }

    .ki-stats {
        grid-template-columns: 1fr;
    }

    .ki-hero-amount {
        font-size: 2.2rem;
    }

    .ki-nav {
        flex-direction: column;
    }
}
