/* ============================================
   Homeoffice Anteil & Prozent Rechner
   Flexible Converter & Calculator Styles
   ============================================ */

/* ============================================
   Mode Selector Section
   ============================================ */
.mode-selector-section {
    margin-bottom: 48px;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.mode-card {
    background: #ffffff;
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.mode-card.active {
    border-color: #d69e2e;
    background: linear-gradient(135deg, #fef5e7 0%, #ffffff 100%);
    box-shadow: 0 4px 16px rgba(214, 158, 46, 0.2);
}

.mode-card.active::before {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #d69e2e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.mode-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.mode-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 8px 0;
}

.mode-card p {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

/* ============================================
   Calculator Mode Sections
   ============================================ */
.calculator-mode {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calculator-mode.active {
    display: block;
}

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

.mode-header {
    text-align: center;
    margin-bottom: 40px;
}

.mode-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 12px 0;
}

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

/* ============================================
   Converter Container
   ============================================ */
.converter-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    margin-bottom: 40px;
    align-items: start;
}

.converter-panel {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.converter-panel h3 {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 24px 0;
    text-align: center;
}

.converter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.converter-input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.converter-input:focus {
    outline: none;
    border-color: #003366;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.result-display {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #d69e2e 0%, #f6ad55 100%);
    border-radius: 12px;
    text-align: center;
}

.result-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 600;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

/* ============================================
   Converter Divider
   ============================================ */
.converter-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.3);
}

/* ============================================
   Quick Presets
   ============================================ */
.quick-presets {
    margin-bottom: 40px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
}

.quick-presets h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.preset-btn {
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: #d69e2e;
    background: #fef5e7;
    transform: translateY(-2px);
}

/* ============================================
   Visual Breakdown
   ============================================ */
.visual-breakdown {
    margin-bottom: 40px;
}

.visual-breakdown h4 {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 20px 0;
}

.progress-container {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
}

.progress-bar {
    height: 60px;
    background: #f7fafc;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    position: relative;
}

.progress-homeoffice {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.progress-office {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.progress-deductible {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.progress-private {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
}

.progress-label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-homeoffice {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.legend-office {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.legend-deductible {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.legend-private {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
}

.legend-professional {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.legend-text {
    font-size: 14px;
    color: #2d3748;
    font-weight: 600;
}

/* ============================================
   Room Guide
   ============================================ */
.room-guide {
    margin-bottom: 40px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
}

.room-guide h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.guide-item {
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.guide-item strong {
    display: block;
    font-size: 15px;
    color: #003366;
    margin-bottom: 4px;
}

.guide-item span {
    font-size: 13px;
    color: #718096;
}

/* ============================================
   Cost Calculator
   ============================================ */
.cost-calculator {
    max-width: 1000px;
    margin: 0 auto;
}

.cost-input-section {
    margin-bottom: 32px;
    padding: 32px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
}

.cost-input-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 24px 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.percent-slider {
    width: 100%;
    margin-top: 12px;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.percent-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d69e2e;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(214, 158, 46, 0.4);
}

.percent-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d69e2e;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(214, 158, 46, 0.4);
}

.cost-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cost-result-card {
    padding: 28px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cost-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-deductible {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #ffffff;
}

.card-private {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #2d3748;
}

.card-annual {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #ffffff;
}

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.card-label {
    font-size: 14px;
    margin-bottom: 12px;
    opacity: 0.9;
    font-weight: 600;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-detail {
    font-size: 12px;
    opacity: 0.8;
}

/* ============================================
   Cost Examples
   ============================================ */
.cost-examples {
    margin-bottom: 40px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
}

.cost-examples h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.example-btn {
    padding: 20px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.example-btn:hover {
    border-color: #d69e2e;
    background: #fef5e7;
    transform: translateY(-2px);
}

.example-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.example-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.example-amount {
    font-size: 16px;
    font-weight: 700;
    color: #d69e2e;
}

/* ============================================
   Usage Calculator
   ============================================ */
.usage-calculator {
    max-width: 1000px;
    margin: 0 auto;
}

.usage-controls {
    margin-bottom: 32px;
    padding: 32px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
}

.usage-controls h3 {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 24px 0;
}

.slider-container {
    padding: 20px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.label-private {
    color: #a0aec0;
}

.label-professional {
    color: #4299e1;
}

.usage-slider {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, #cbd5e0 0%, #4299e1 100%);
    outline: none;
    -webkit-appearance: none;
    margin: 16px 0;
}

.usage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 4px solid #d69e2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.usage-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 4px solid #d69e2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 20px;
    font-weight: 700;
}

.value-private {
    color: #a0aec0;
}

.value-professional {
    color: #4299e1;
}

.usage-input-section {
    margin-bottom: 32px;
    padding: 32px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
}

.usage-input-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 24px 0;
}

.usage-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.usage-result-card {
    padding: 28px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.usage-result-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
    color: #4a5568;
}

.result-row strong {
    font-size: 18px;
    color: #003366;
}

.result-highlight {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
}

.result-highlight strong {
    font-size: 24px;
    color: #d69e2e;
}

/* ============================================
   Pie Chart
   ============================================ */
.pie-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.pie-chart {
    width: 200px;
    height: 200px;
}

.pie-segment {
    fill: none;
    stroke-width: 50;
    transition: all 0.5s ease;
}

.pie-professional {
    stroke: #4299e1;
}

.pie-private {
    stroke: #cbd5e0;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   Usage Presets
   ============================================ */
.usage-presets {
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
    margin-bottom: 40px;
}

.usage-presets h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.usage-preset-btn {
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.usage-preset-btn:hover {
    border-color: #d69e2e;
    background: #fef5e7;
    transform: translateY(-2px);
}

.usage-preset-btn strong {
    display: block;
    font-size: 20px;
    color: #003366;
    margin-bottom: 4px;
}

.usage-preset-btn span {
    font-size: 12px;
    color: #718096;
}

/* ============================================
   Scenarios Section
   ============================================ */
.scenarios-section {
    margin-bottom: 48px;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.scenario-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.scenario-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.scenario-icon {
    font-size: 36px;
}

.scenario-header h3 {
    margin: 0;
    font-size: 18px;
}

.scenario-body {
    padding: 24px;
}

.scenario-body p {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 16px;
}

.scenario-calc {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.calc-step {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.calc-step:last-child {
    border-bottom: none;
}

.step-label {
    color: #718096;
}

.step-value {
    color: #2d3748;
    font-weight: 600;
}

.calc-result {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #d69e2e;
}

.calc-result .step-value {
    color: #d69e2e;
    font-size: 20px;
}

.scenario-tip {
    padding: 12px;
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    border-radius: 6px;
    font-size: 13px;
    color: #7c2d12;
}

.scenario-tip strong {
    color: #7c2d12;
}

/* ============================================
   Formulas Section
   ============================================ */
.formulas-section {
    margin-bottom: 48px;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.formula-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.formula-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #d69e2e;
}

.formula-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

.formula-box {
    padding: 16px;
    background: #f7fafc;
    border-left: 4px solid #d69e2e;
    border-radius: 8px;
    margin-bottom: 16px;
}

.formula-box code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #2d3748;
    word-break: break-word;
}

.formula-example {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.formula-example strong {
    color: #d69e2e;
    font-size: 16px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .converter-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .converter-divider {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .mode-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mode-header h2 {
        font-size: 24px;
    }

    .converter-panel {
        padding: 24px;
    }

    .result-value {
        font-size: 28px;
    }

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

    .cost-results-grid {
        grid-template-columns: 1fr;
    }

    .scenarios-grid {
        grid-template-columns: 1fr;
    }

    .formula-grid {
        grid-template-columns: 1fr;
    }
}

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

    .mode-icon {
        font-size: 36px;
    }

    .mode-card {
        padding: 24px 16px;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

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

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

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

    .card-value {
        font-size: 24px;
    }
}

