/* ABOUTME: Responsive styles for German inheritance tax calculator
   ABOUTME: Implements Braun-Legal branding with Gold/Gray color scheme */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Poppins Placeholder', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    background-color: #f5f5f5;
    padding: 20px;
}

/* Container */
.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.calculator-header {
    background: linear-gradient(135deg, #E8C462 0%, #C9A64F 100%);
    padding: 40px 30px;
    text-align: center;
    color: #333333;
}

.calculator-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 14px;
    background: rgba(232, 196, 98, 0.15);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
}

.calculator-icon img {
    width: 56px;
    height: 56px;
}

.calculator-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2B2B2B;
}

.subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #444444;
    opacity: 0.9;
}

/* Progress Bar */
.progress-container {
    padding: 30px 30px 20px;
    background: #ffffff;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #E8C462;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.step {
    font-size: 14px;
    color: #999999;
    font-weight: 500;
    text-align: center;
    flex: 1;
    position: relative;
    padding-top: 25px;
}

.step::before {
    content: attr(data-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #999999;
}

.step.active {
    color: #333333;
}

.step.active::before {
    background: #E8C462;
    color: #333333;
}

.step.completed::before {
    background: #4CAF50;
    color: #ffffff;
    content: '✓';
}

/* Form Container */
.calculator-form {
    padding: 30px;
}

/* Form Steps */
.form-step {
    display: none;
}

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

.form-step h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333333;
}

.step-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 30px;
}

.section-hint {
    font-size: 14px;
    color: #666666;
    margin-bottom: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333333;
    position: relative;
}

.required {
    color: #e74c3c;
    font-weight: 600;
}

.optional {
    color: #999999;
    font-size: 14px;
    font-weight: 400;
}

/* Input Styles */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Poppins', 'Poppins Placeholder', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #E8C462;
}

input.error {
    border-color: #e74c3c;
}

.currency-input {
    text-align: right;
}

/* Error Messages */
.error-message {
    display: none;
    font-size: 14px;
    color: #e74c3c;
    margin-top: 5px;
}

.error-message.show {
    display: block;
}

/* Info Buttons */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
    position: relative;
}

.info-btn img {
    width: 16px;
    height: 16px;
}

.info-btn:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #333333;
    color: #ffffff;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 250px;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Checkbox Styles */
.checkbox-group {
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 16px;
    color: #333333;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Poppins', 'Poppins Placeholder', sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: #E8C462;
    color: #333333;
}

.btn-primary:hover:not(:disabled) {
    background: #C9A64F;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333333;
}

.btn-secondary:hover:not(:disabled) {
    background: #d0d0d0;
}

.btn-calculate {
    background: #E8C462;
    color: #333333;
    width: 100%;
    font-size: 18px;
    padding: 16px;
    font-weight: 600;
}

.btn-cta {
    background: #E8C462;
    color: #333333;
    width: 100%;
    font-size: 18px;
    padding: 16px;
    font-weight: 600;
    margin-top: 20px;
}

.btn-add {
    background: transparent;
    color: #E8C462;
    border: 2px solid #E8C462;
    font-size: 14px;
    padding: 8px 16px;
    margin-top: 10px;
}

.btn-add:hover {
    background: #E8C462;
    color: #333333;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.form-navigation .btn:only-child {
    margin-left: auto;
}

/* Gift Entry */
.gift-entry {
    margin-bottom: 15px;
}

.form-group-inline {
    display: flex;
    gap: 15px;
}

.form-group-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Info Box */
.info-box {
    background: #f0f8ff;
    border: 1px solid #d0e8ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333333;
}

/* Result Section */
.result-summary {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.result-label {
    font-size: 18px;
    color: #666666;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
}

.highlight-red .result-value {
    color: #e74c3c;
}

.highlight-green .result-value {
    color: #4CAF50;
}

/* Result Details */
.result-details h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #333333;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.result-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.result-table td:first-child {
    color: #666666;
}

.result-table td:last-child {
    text-align: right;
    font-weight: 500;
}

/* Tax Details */
.tax-details {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.tax-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

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

/* Exemption List */
.exemption-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.exemption-list li {
    padding: 8px 0;
    color: #4CAF50;
    font-size: 16px;
}

.exemption-list li::before {
    content: '✓ ';
    font-weight: 600;
    margin-right: 5px;
}

/* Warning Box */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #856404;
}

/* Disclaimer */
.disclaimer {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
}

/* Form Total */
.form-total {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: right;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .calculator-header {
        padding: 30px 20px;
    }
    
    .calculator-header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .progress-steps {
        font-size: 12px;
    }
    
    .calculator-form {
        padding: 20px;
    }
    
    .form-step h2 {
        font-size: 20px;
    }
    
    .form-navigation {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .form-navigation .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .info-btn:hover::after {
        white-space: normal;
        width: 200px;
    }
}

@media (max-width: 480px) {
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step {
        flex: 1 1 33%;
        margin-bottom: 10px;
    }
    
    .form-group-inline {
        flex-direction: column;
    }
}
