/* Dutch Mortgage Calculator - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #faf9f6;
    min-height: 100vh;
    padding: 15px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    text-align: center;
}

.header h1 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    color: #718096;
    font-size: 14px;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.left-column {
    order: 2;
}

.right-column {
    order: 1;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.card:first-child {
    flex: 1;
}

.card h2 {
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.card.full-width {
    grid-column: 1 / -1;
}

.input-group {
    margin-bottom: 15px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.input-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.input-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: #2d3748;
    font-weight: 600;
}

.value-display .value {
    font-size: 18px;
    color: #667eea;
}

.value-display .subtitle {
    font-size: 14px;
    color: #718096;
    font-weight: normal;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.result-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.result-box.secondary {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.result-box h3 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.9;
}

.result-box .amount {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.result-box.secondary .amount {
    color: #667eea;
}

.result-box .savings {
    font-size: 13px;
    opacity: 0.95;
}

.breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    font-size: 13px;
}

.breakdown-item.negative {
    background: #f0fff4;
    color: #22543d;
}

.breakdown-item.positive {
    background: #fff5f5;
    color: #742a2a;
}

.breakdown-item .label {
    font-weight: 600;
}

.breakdown-item .value {
    font-weight: 700;
}

.lifetime-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.stat {
    text-align: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
}

.stat .label {
    font-size: 11px;
    color: #718096;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.stat .value {
    font-size: 20px;
    color: #2d3748;
    font-weight: 700;
}

.nhg-badge {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.info-text {
    color: #718096;
    font-size: 13px;
    margin-top: 10px;
    font-style: italic;
}

.stepper-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn:hover {
    background: #f7fafc;
    border-color: #667eea;
    color: #667eea;
}

.stepper-btn:active {
    background: #edf2f7;
}

.stepper-value {
    flex: 1;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    color: #2d3748;
}

.stepper-value:focus {
    outline: none;
    border-color: #667eea;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s;
}

.toggle-btn:hover {
    border-color: #667eea;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.partner-income {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 6px;
}

.partner-income.visible {
    display: block;
}

.affordability-indicator {
    margin-top: 12px;
    padding: 15px;
    border-radius: 8px;
    background: #f7fafc;
}

.affordability-bar {
    height: 25px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 10px 0;
}

.affordability-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    transition: width 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.affordability-fill.warning {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 100%);
}

.affordability-fill.danger {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

.affordability-label {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
}

.max-mortgage-box {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 12px;
    text-align: center;
}

.max-mortgage-box h3 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.9;
}

.max-mortgage-box .amount {
    font-size: 26px;
    font-weight: 700;
}

.max-mortgage-box .subtitle {
    font-size: 12px;
    margin-top: 6px;
    opacity: 0.9;
}

.alert-box {
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
}

.alert-box.success {
    background: #f0fff4;
    color: #22543d;
    border: 2px solid #48bb78;
}

.alert-box.warning {
    background: #fffaf0;
    color: #744210;
    border: 2px solid #ed8936;
}

.alert-box.danger {
    background: #fff5f5;
    color: #742a2a;
    border: 2px solid #f56565;
}

/* Existing house section */
.existing-house-section {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 6px;
}

.existing-house-section.visible {
    display: block;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.lang-btn.active {
    border-color: #667eea !important;
    color: #2d3748 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .breakdown {
        grid-template-columns: 1fr;
    }

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

    .header h1 {
        font-size: 22px;
    }

    .result-box .amount {
        font-size: 24px;
    }

    .container {
        padding: 0;
    }

    body {
        padding: 10px;
    }
}
