/* ThuisbatterijGids Savings Calculator v6.5.7 */

/* Design tokens — shared with other plugin stylesheets */
.calc-container {
    --tbg-text: #0f172a;
    --tbg-text-mid: #475569;
    --tbg-text-light: #64748b;
    --tbg-muted: #94a3b8;
    --tbg-border: #eee8e0;
    --tbg-border-dark: #ddd6c8;
    --tbg-bg: #faf8f4;
    --tbg-bg-dark: #f5f3ee;
    --tbg-white: #ffffff;
    --tbg-dark: #0f172a;
    --tbg-accent: #10b981;
    --tbg-accent-hover: #059669;
    --tbg-accent-dark: #047857;
}

/* Container */
.calc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calc-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--tbg-text);
    margin: 0 0 0.5rem 0;
}

.calc-subtitle {
    font-size: 1.125rem;
    color: var(--tbg-text-light);
    margin: 0;
}

/* Progress Steps */
.calc-progress {
    margin-bottom: 2rem;
    padding: 1.5rem 0 1.25rem;
    border-bottom: 1px solid var(--tbg-border);
}

.progress-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
}

.progress-step:last-child {
    flex: 0 0 auto;
}

.progress-step::after {
    content: '';
    height: 2px;
    background: #ddd6c8;
    flex: 1;
    margin-left: 2px;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: #10b981;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f3ee;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    border: 1px solid #ddd6c8;
    margin: 0;
    transition: all 0.2s ease;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: none;
}

.step-label {
    display: none;
}

.progress-bar-track {
    display: none;
}

.progress-bar-fill {
    display: none;
}

/* Step labels under dots */
.calc-progress::after {
    content: '';
}

.calc-step-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.calc-step-labels span.active {
    color: #10b981;
}

/* Calculator Body */
.calc-body {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    min-height: 400px;
}

/* Steps */
.calc-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.calc-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tbg-text);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

/* Form Fields */
.calc-field {
    margin-bottom: 2rem;
}

.field-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.field-hint {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Sliders */
.slider-container {
    position: relative;
}

.calc-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--tbg-accent) 0%, var(--tbg-accent) 50%, var(--tbg-border) 50%, var(--tbg-border) 100%);
    outline: none;
    margin-bottom: 0.5rem;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #10b981;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.calc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #10b981;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tbg-text);
}

.slider-value span:first-child {
    color: #10b981;
}

.slider-sub {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--tbg-text-light);
    margin-left: 0.25rem;
}

/* Toggle Buttons */
.toggle-buttons {
    display: flex;
    gap: 1rem;
}

.toggle-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem;
    border: 2px solid var(--tbg-border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.toggle-btn:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.toggle-btn.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
}

.toggle-icon {
    font-size: 1.5rem;
}

.toggle-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--tbg-text-light);
}

/* Option Cards */
.option-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-cards.small {
    flex-direction: row;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--tbg-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-cards.small .option-card {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 1rem;
}

.option-card:hover {
    border-color: #10b981;
    background: var(--tbg-bg);
}

.option-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.option-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    color: var(--tbg-text);
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.option-content span {
    font-size: 0.8125rem;
    color: var(--tbg-text-light);
}

.option-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: var(--tbg-text-light);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.option-badge.best {
}

/* Battery Selection Grid */
.battery-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.battery-select-card {
    border: 2px solid var(--tbg-border);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.battery-select-card:hover {
    border-color: #10b981;
    background: var(--tbg-bg);
}

.battery-select-card.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.battery-card-image {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.battery-card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.battery-card-image .no-image {
    font-size: 2.5rem;
    opacity: 0.5;
}

.battery-card-info strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--tbg-text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.battery-specs {
    font-size: 0.6875rem;
    color: var(--tbg-text-light);
}

.no-batteries-msg {
    text-align: center;
    color: var(--tbg-text-light);
    padding: 2rem;
}

/* Battery Dropdown */
.battery-dropdown-wrapper {
    position: relative;
}

.battery-dropdown {
    width: 100%;
    padding: 1rem 2.5rem 1rem 1rem;
    border: 2px solid var(--tbg-border);
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    transition: all 0.2s ease;
}

.battery-dropdown:hover {
    border-color: #10b981;
}

.battery-dropdown:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.battery-dropdown option {
    padding: 0.75rem;
}

/* Battery Picker (Custom Dropdown) */
.battery-picker {
    position: relative;
}

.battery-picker-overlay {
    display: none;
}

@media (max-width: 480px) {
    .battery-picker-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
    }

    .battery-picker.open .battery-picker-overlay {
        display: block;
    }
}

.battery-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--tbg-border);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.battery-picker-trigger:hover {
    border-color: #10b981;
}

.battery-picker.open .battery-picker-trigger {
    border-color: #10b981;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.picker-placeholder {
    color: #9ca3af;
    font-size: 0.9375rem;
}

.picker-selected {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.picker-selected .selected-name {
    font-weight: 600;
    color: var(--tbg-text);
    font-size: 0.9375rem;
}

.picker-selected .selected-specs {
    font-size: 0.75rem;
    color: var(--tbg-text-light);
}

.picker-arrow {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.battery-picker.open .picker-arrow {
    transform: rotate(180deg);
}

.battery-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #10b981;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 320px;
    overflow: hidden;
}

.battery-picker.open .battery-picker-dropdown {
    display: block;
}

.picker-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--tbg-border);
    position: sticky;
    top: 0;
    background: white;
}

.picker-search input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--tbg-border);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.picker-search input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.picker-list {
    max-height: 240px;
    overflow-y: auto;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--tbg-bg-dark);
}

.picker-item:last-child {
    border-bottom: none;
}

.picker-item:hover {
    background: #f0fdf4;
}

.picker-item.selected {
    background: #ecfdf5;
}

.picker-item-image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tbg-bg);
    border-radius: 6px;
    overflow: hidden;
}

.picker-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.picker-item-image svg {
    color: #9ca3af;
}

.picker-item-info {
    flex: 1;
    min-width: 0;
}

.picker-item-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tbg-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item-specs {
    display: block;
    font-size: 0.75rem;
    color: var(--tbg-text-light);
}

.picker-empty {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.picker-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Power Limit Warning */
.power-limit-hint {
    margin-top: 0.5rem;
}

.limit-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    border: 1px solid #fcd34d;
}

.limit-warning strong {
    color: #d97706;
}

/* Quantity Summary */
.quantity-summary {
    margin-top: 0.75rem;
    text-align: center;
}

.summary-text {
    display: inline-block;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    border: 1px solid #10b981;
}

.summary-text strong {
    color: #047857;
}

/* Solar Panel Presets */
.solar-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.solar-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--tbg-border);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.solar-preset:hover {
    border-color: #10b981;
    background: #f0fdf4 !important;
}

.solar-preset:hover .preset-label {
    color: #065f46 !important;
}

.solar-preset:hover .preset-value {
    color: #059669 !important;
}

.solar-preset.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.preset-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.solar-preset.active .preset-label {
    color: #065f46;
}

.preset-value {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.solar-preset.active .preset-value {
    color: #059669;
}

.slider-hint {
    margin-top: 0.5rem;
    font-style: italic;
}

/* Quantity Stepper */
.quantity-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 0.75rem;
    max-width: 180px;
}

.stepper-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--tbg-border);
    background: white;
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn.minus {
    border-radius: 10px 0 0 10px;
    border-right: 1px solid var(--tbg-border);
}

.stepper-btn.plus {
    border-radius: 0 10px 10px 0;
    border-left: 1px solid var(--tbg-border);
}

.stepper-btn:hover {
    border-color: #10b981;
    background: #f0fdf4 !important;
    color: #065f46 !important;
}

.stepper-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stepper-btn:disabled:hover {
    border-color: var(--tbg-border);
    background: white !important;
    color: #374151 !important;
}

.stepper-value {
    flex: 1;
    height: 48px;
    border: 2px solid var(--tbg-border);
    border-left: none;
    border-right: none;
    background: var(--tbg-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tbg-text);
}

/* Results */
.results-hero {
    margin-bottom: 2rem;
}

.result-main {
    margin-bottom: 1.5rem;
}

.result-card {
    background: #ffffff;
    border: 1px solid var(--tbg-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.result-card.primary {
    background: linear-gradient(135deg, #475569, #334155);
    color: white;
}

.result-card .result-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-card .result-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.result-card.primary .result-value {
    font-size: 3rem;
}

.result-card .result-sub {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.result-cards.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

/* Selected Battery Card */
.selected-battery-card {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--tbg-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.battery-card-image {
    width: 140px;
    min-height: 140px;
    background: var(--tbg-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 1rem;
}

.battery-card-image img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.battery-image-placeholder {
    color: #94a3b8;
}

.battery-card-content {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.battery-card-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tbg-text);
}

.selected-battery-card .battery-card-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.selected-battery-card .spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.selected-battery-card .spec-label {
    color: var(--tbg-text-light);
}

.selected-battery-card .spec-value {
    font-weight: 600;
    color: var(--tbg-text);
}

.selected-battery-card .spec-value.price {
    color: #10b981;
}

.battery-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10b981 !important;
    color: white !important;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    transition: background 0.15s ease;
    margin-top: auto;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.battery-cta-btn:hover {
    background: #059669 !important;
    color: white !important;
}

@media (max-width: 480px) {
    .selected-battery-card {
        flex-direction: column;
    }

    .battery-card-image {
        width: 100%;
        min-height: 100px;
    }

    .selected-battery-card .battery-card-specs {
        grid-template-columns: 1fr;
    }

    /* Battery Picker Mobile */
    .battery-picker-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        border: none;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    }

    .battery-picker.open .battery-picker-trigger {
        border-radius: 12px;
    }

    .picker-search {
        padding: 1rem;
    }

    .picker-search input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .picker-list {
        max-height: calc(70vh - 80px);
    }

    .picker-item {
        padding: 1rem;
    }

    .picker-item-image {
        width: 48px;
        height: 48px;
    }

    .picker-item-name {
        font-size: 1rem;
    }

    .picker-item-specs {
        font-size: 0.8125rem;
    }
}

.result-cards .result-card {
    padding: 1rem;
}

.result-cards .result-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-cards .result-value {
    font-size: 1.5rem;
    color: var(--tbg-text);
}

.result-cards .result-value.profit {
    color: #10b981;
}

.result-cards .result-value.loss {
    color: #ef4444;
}

/* Breakdown */
.results-breakdown {
    background: var(--tbg-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-breakdown h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
}

.breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #374151;
}

.breakdown-value {
    font-weight: 600;
}

.breakdown-bar {
    height: 8px;
    background: var(--tbg-border);
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.breakdown-fill.solar {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.breakdown-fill.dynamic {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.breakdown-fill.night {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.breakdown-fill.terugleverkosten {
    background: linear-gradient(90deg, #10b981, #059669);
}

.breakdown-explain {
    font-size: 0.8125rem;
    color: var(--tbg-text-light);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.breakdown-hint {
    font-size: 0.75rem;
    color: var(--tbg-muted);
    margin: 0;
    line-height: 1.4;
}

/* Info Box */
.results-info {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #fde68a;
}

.info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-content {
    font-size: 0.875rem;
    color: #92400e;
}

.info-content strong {
    color: #78350f;
}

.info-detail {
    color: #b45309;
    font-size: 0.8125rem;
}

/* Affiliate CTA */
.results-affiliate {
    margin-bottom: 1.5rem;
}

.affiliate-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.affiliate-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #f59e0b;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.375rem 1rem;
    border-bottom-left-radius: 8px;
    text-transform: uppercase;
}

.affiliate-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.affiliate-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.affiliate-text {
    flex: 1;
}

.affiliate-text strong {
    display: block;
    font-size: 1.125rem;
    color: #92400e;
    margin-bottom: 0.125rem;
}

.affiliate-text span {
    font-size: 0.875rem;
    color: #b45309;
}

.affiliate-btn {
    display: block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    text-align: center;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Collapsible Details */
.results-details {
    margin-top: 1rem;
    border: 1px solid var(--tbg-border);
    border-radius: 8px;
    overflow: hidden;
}

.results-details summary {
    padding: 0.75rem 1rem;
    background: var(--tbg-bg);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tbg-text-light);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-details summary::-webkit-details-marker {
    display: none;
}

.results-details summary::before {
    content: '▶';
    font-size: 0.625rem;
    transition: transform 0.2s ease;
}

.results-details[open] summary::before {
    transform: rotate(90deg);
}

.details-content {
    padding: 1rem;
    background: white;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--tbg-text-light);
    border-bottom: 1px solid var(--tbg-bg-dark);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: var(--tbg-text);
}

/* CTA */
.results-cta {
    text-align: center;
    padding-top: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0 0.5rem;
}

.cta-button.primary {
    color: white;
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cta-button.secondary {
    background: white;
    color: #374151;
    border: 2px solid var(--tbg-border);
}

.cta-button.secondary:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Disclaimer */
.results-disclaimer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tbg-border);
}

.results-disclaimer p {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
}

/* Navigation */
.calc-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tbg-border);
}

.nav-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prev-btn {
    background: white !important;
    color: #374151 !important;
    border: 2px solid var(--tbg-border) !important;
}

.prev-btn:hover {
    background: var(--tbg-border) !important;
    color: var(--tbg-text) !important;
    border-color: #9ca3af !important;
}

.next-btn {
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.next-btn:disabled {
    background: var(--tbg-border);
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Disclaimer */
.calc-disclaimer {
    margin-top: 2rem;
    text-align: center;
}

.calc-disclaimer p {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .calc-container {
        padding: 1rem 0.5rem;
    }

    .calc-title {
        font-size: 1.75rem;
    }

    .calc-body {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .step-label {
        display: none;
    }

    .toggle-buttons {
        flex-direction: column;
    }

    .option-cards.small {
        flex-direction: column;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .calc-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
    }

    .prev-btn {
        order: 2;
    }

    .cta-button {
        display: block;
        margin: 0.5rem 0;
    }

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

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

/* Animation for result values */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-value.animate {
    animation: countUp 0.5s ease forwards;
}

/* Advanced solar field - teruglevering input */
.solar-advanced {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--tbg-border);
}

.field-optional {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.25rem;
}

.input-with-unit {
    display: flex;
    align-items: stretch;
    max-width: 280px;
}

.calc-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--tbg-border);
    border-radius: 10px 0 0 10px;
    border-right: none;
    background: white;
    color: var(--tbg-text);
    transition: border-color 0.2s ease;
    -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input:focus {
    outline: none;
    border-color: #10b981;
}

.calc-input::placeholder {
    color: #9ca3af;
}

.input-unit {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: var(--tbg-bg-dark);
    border: 2px solid var(--tbg-border);
    border-left: none;
    border-radius: 0 10px 10px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tbg-text-light);
    white-space: nowrap;
}

#terugleveringHint {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 8px;
    color: #065f46;
    font-size: 0.8125rem;
}

#terugleveringHint .hint-icon {
    margin-right: 0.25rem;
}

/* Beta label — top-right corner of calculator */
.calc-container {
    position: relative;
}

/* Advies Tool */
.advies-inputs {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--tbg-border);
}

.advies-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.advies-row:last-child {
    margin-bottom: 0;
}

.advies-prio-buttons {
    flex-wrap: wrap;
}

.advies-prio-buttons .toggle-btn {
    flex: unset;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Capaciteit resultaat */
.cap-resultaat {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 16px;
}

.cap-resultaat-getal {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cap-label {
    display: block;
    font-size: 0.875rem;
    color: #065f46;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cap-resultaat-getal .cap-label {
    position: absolute;
    top: -1.5rem;
}

.cap-resultaat-getal {
    position: relative;
    padding-top: 1rem;
}

.cap-waarde {
    font-size: 3.5rem;
    font-weight: 800;
    color: #047857;
    line-height: 1;
}

.cap-eenheid {
    font-size: 1.5rem;
    font-weight: 600;
    color: #059669;
}

.cap-toelichting {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.cap-toelichting ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cap-toelichting li {
    font-size: 0.875rem;
    color: #065f46;
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.cap-toelichting li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

@media (max-width: 640px) {
    .advies-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cap-waarde {
        font-size: 2.5rem;
    }
}

/* Payback Timeline Chart */
.results-chart {
    background: var(--tbg-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-chart h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
}

.chart-container {
    width: 100%;
    aspect-ratio: 2 / 1;
    min-height: 200px;
}

.chart-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--tbg-text-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.savings {
    background: #10b981;
}

.legend-dot.investment {
    background: #ef4444;
}

/* ============================================================
 * V8.0.0 ADDITIONS — editorial result, saldering warning, aannames
 * ============================================================ */

/* Saldering warning */
.calc-saldering-warning {
    margin-top: 14px;
}

/* Toggle icon SVG centering */
.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tbg-text-muted, #475569);
}

.toggle-btn.active .toggle-icon {
    color: var(--tbg-accent, #10b981);
}

.option-icon {
    color: var(--tbg-text-muted, #475569);
}

.option-card.active .option-icon {
    color: var(--tbg-accent, #10b981);
}

/* Breakdown label SVG */
.breakdown-label-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tbg-text, #0f172a);
    font-weight: 700;
}

.breakdown-label-text svg {
    flex-shrink: 0;
}

#breakdownZelfverbruik .breakdown-label-text svg { color: #f59e0b; }
#breakdownArbitrage .breakdown-label-text svg { color: #10b981; }
#breakdownDagNacht .breakdown-label-text svg { color: #6366f1; }

/* Editorial result hero spacing within calc step */
.calc-step .tbg-tool__result-hero {
    border-radius: var(--tbg-radius-lg, 12px);
    border: 1px solid var(--tbg-border, #eee8e0);
    background: white;
    margin-bottom: 24px;
    padding: 32px 28px;
    border-bottom: 1px solid var(--tbg-border, #eee8e0);
}

.calc-step .tbg-tool__result-hero .tbg-tool__result-headline {
    font-size: 2rem;
}

@media (max-width: 600px) {
    .calc-step .tbg-tool__result-hero {
        padding: 22px 18px;
    }
    .calc-step .tbg-tool__result-hero .tbg-tool__result-headline {
        font-size: 1.5rem;
    }
}

/* Cross-link card */
.calc-step .tbg-tool__crosslink {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* Aannames details */
.calc-aannames {
    background: var(--tbg-bg-soft, #f5f3ee);
    border: 1px solid var(--tbg-border, #eee8e0);
    border-radius: var(--tbg-radius-sm, 8px);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--tbg-text-muted, #475569);
    line-height: 1.6;
}

.calc-aannames summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--tbg-text, #0f172a);
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-aannames summary::-webkit-details-marker { display: none; }

.calc-aannames summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--tbg-border-strong, #ddd6c8);
    color: var(--tbg-text-muted, #475569);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

.calc-aannames[open] summary::before {
    content: '−';
}

.calc-aannames p {
    margin-top: 12px;
    margin-bottom: 0;
}

.calc-aannames ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.calc-aannames li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.calc-aannames li:last-child {
    margin-bottom: 0;
}

/* Saldering-waarschuwing */
.calc-saldering-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 16px 18px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.calc-saldering-warning[hidden] {
    display: none;
}

.calc-saldering-warning svg {
    flex-shrink: 0;
    color: #ca8a04;
    margin-top: 1px;
}

.calc-saldering-warning strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.calc-saldering-warning p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569;
}

/* Hide old results-hero / result-card gradient styles when new editorial layout used */
.calc-step .results-hero { display: none; }

/* ============================================================
 * V8 ITERATIE FIXES
 * ============================================================ */

/* Aannames inline jump link in prose */
.calc-aannames-jump {
    color: var(--tbg-accent, #10b981);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    margin-left: 2px;
}

.calc-aannames-jump:hover {
    color: var(--tbg-accent-hover, #059669);
}

/* Compact cross-link (vervangt de grote tbg-tool__crosslink) */
.calc-crosslink-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: var(--tbg-bg-soft, #f5f3ee);
    border: 1px solid var(--tbg-border, #eee8e0);
    border-radius: var(--tbg-radius-md, 10px);
    margin: 18px 0;
    font-size: 14px;
    flex-wrap: wrap;
}

.calc-crosslink-text {
    color: var(--tbg-text-muted, #475569);
    line-height: 1.4;
}

.calc-crosslink-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tbg-accent, #10b981);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.calc-crosslink-link:hover {
    color: var(--tbg-accent-hover, #059669);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Aannames details omhoog gehaald - geen losse styles nodig, blijft op
   ID #calc-aannames maar dan direct na breakdown */

@media (max-width: 600px) {
    .calc-crosslink-compact {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
 * V8 ITERATIE — MOBIELE PROGRESS BAR + GENERAL MOBILE FIXES
 * ============================================================ */

@media (max-width: 600px) {
    .calc-container {
        margin: 1rem 0;
        border-radius: 10px;
    }

    .calc-progress {
        padding: 1rem 16px 0.875rem;
    }

    .progress-steps {
        gap: 6px;
        margin-bottom: 8px;
    }

    .calc-step-labels {
        font-size: 10px;
        gap: 4px;
    }

    .calc-step-labels span {
        flex: 1;
        text-align: center;
    }

    .calc-step-labels span:not(.active) {
        opacity: 0.6;
    }

    .calc-body {
        padding: 1.25rem 1rem;
    }

    .step-title {
        font-size: 1.25rem;
    }

    /* Toggle buttons fit better */
    .toggle-buttons {
        gap: 8px;
    }

    .toggle-btn {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Option cards stack op smal */
    .option-cards {
        flex-direction: column;
    }

    /* Slider value text */
    .slider-value {
        font-size: 14px;
    }

    /* Solar presets 2x2 op mobile */
    .solar-presets {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Result hero adjustments */
    .calc-step .tbg-tool__result-hero {
        padding: 20px 16px;
    }

    .calc-step .tbg-tool__result-hero .tbg-tool__result-headline {
        font-size: 1.3rem;
        line-height: 1.25;
    }

    .tbg-tool__result-prose {
        font-size: 14px;
    }

    /* Stats stacken (al via tbg-tools), maar zorg dat het er goed uit ziet */
    .calc-step .tbg-tool__result-stats {
        padding: 14px 0;
    }

    /* Crosslink compact stack */
    .calc-crosslink-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
    }

    .calc-crosslink-text {
        font-size: 13px;
    }
}
