/**
 * Westarp Buchkalkulator - Styles
 * Optimiert für Zielgruppe 60+ (große Schrift, hoher Kontrast, klare Struktur)
 */

/* ============================================
   CSS VARIABLEN
   ============================================ */
:root {
    /* Farben - Westarp Corporate Identity */
    --bk-primary: #1e3a5f;          /* Westarp-Blau (aus Logo) */
    --bk-primary-light: #2d4a6f;
    --bk-primary-dark: #152a45;
    
    --bk-accent: #6b7b8a;           /* Akzent-Grau (aus "ON" im Logo) */
    --bk-accent-light: #8b9ba8;
    
    --bk-success: #059669;          /* Grün für Honorar */
    
    --bk-text: #1f2937;             /* Fast Schwarz */
    --bk-text-light: #4b5563;
    --bk-text-muted: #6b7280;
    
    --bk-bg: #fafaf9;               /* Cremeweiß - Augenfreundlich */
    --bk-bg-card: #ffffff;
    --bk-border: #e5e7eb;
    
    /* Typografie */
    --bk-font: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bk-font-size: 18px;           /* Basis für 60+ */
    --bk-line-height: 1.7;
    
    /* Abstände */
    --bk-spacing: 24px;
    --bk-radius: 12px;
    
    /* Schatten */
    --bk-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bk-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   CONTAINER
   ============================================ */
.westarp-buchkalkulator {
    font-family: var(--bk-font);
    font-size: var(--bk-font-size);
    line-height: var(--bk-line-height);
    color: var(--bk-text);
    background: var(--bk-bg);
    padding: var(--bk-spacing);
    border-radius: var(--bk-radius);
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   HEADER - WESTARP CI
   Farben: Westarp-Blau #1e3a5f, Akzent #6b7b8a
   ============================================ */
.bk-header {
    margin-bottom: calc(var(--bk-spacing) * 2);
    padding: calc(var(--bk-spacing) * 1.5);
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    border-radius: var(--bk-radius);
    color: white;
}

.bk-header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.bk-logo {
    flex-shrink: 0;
}

.bk-logo-img {
    max-height: 80px;
    width: auto;
    display: block;
}

/* Text-Logo als Fallback wenn kein Bild vorhanden */
.bk-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.bk-logo-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.bk-logo-sub {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

.bk-header-text {
    text-align: center;
    flex: 1;
}

/* Haupt-Titel */
.bk-title {
    font-size: 2.2rem;
    color: white;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Fallback für h2 */
.bk-header h2 {
    font-size: 2rem;
    color: white;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.bk-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

.bk-header-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bk-feature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.bk-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #4ade80;
    color: #1e3a5f;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Responsive: Logo oben bei schmalem Bildschirm */
@media (max-width: 600px) {
    .bk-header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .bk-header-text {
        text-align: center;
    }
    
    .bk-logo-img {
        max-height: 60px;
    }
}

/* ============================================
   FIELDSETS (Schritte)
   ============================================ */
.bk-fieldset {
    background: var(--bk-bg-card);
    border: 2px solid var(--bk-border);
    border-radius: var(--bk-radius);
    padding: var(--bk-spacing);
    margin-bottom: var(--bk-spacing);
}

.bk-fieldset legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bk-primary);
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bk-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bk-primary);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

.bk-optional {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--bk-text-muted);
}

/* ============================================
   OPTIONEN (Radio-Buttons als Karten)
   ============================================ */
.bk-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.bk-option {
    cursor: pointer;
}

.bk-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bk-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--bk-bg);
    border: 3px solid var(--bk-border);
    border-radius: var(--bk-radius);
    text-align: center;
    transition: all 0.2s ease;
    min-height: 100px;
}

.bk-option:hover .bk-option-content {
    border-color: var(--bk-primary-light);
    box-shadow: var(--bk-shadow);
}

.bk-option input:checked + .bk-option-content {
    border-color: var(--bk-primary);
    background: #eff6ff;
    box-shadow: var(--bk-shadow);
}

.bk-option input:focus + .bk-option-content {
    outline: 3px solid var(--bk-accent);
    outline-offset: 2px;
}

.bk-option-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.bk-option-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--bk-text);
}

.bk-option-desc {
    font-size: 0.9rem;
    color: var(--bk-text-muted);
    margin-top: 4px;
}

/* ============================================
   SLIDER
   ============================================ */
.bk-slider-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bk-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    background: var(--bk-border);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.bk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--bk-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--bk-shadow);
    transition: transform 0.1s ease;
}

.bk-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.bk-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--bk-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--bk-shadow);
}

.bk-slider-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.2rem;
}

.bk-number-input {
    width: 100px;
    padding: 12px 16px;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--bk-border);
    border-radius: 8px;
    background: var(--bk-bg-card);
}

.bk-number-input:focus {
    outline: none;
    border-color: var(--bk-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* ============================================
   HILFETEXT
   ============================================ */
.bk-help {
    font-size: 0.95rem;
    color: var(--bk-text-muted);
    margin: 12px 0 0 0;
    padding: 12px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid var(--bk-accent);
}

.bk-rabatt-info {
    margin-top: 12px;
    padding: 12px;
    background: #d1fae5;
    border-radius: 8px;
    border-left: 4px solid var(--bk-success);
    color: #065f46;
}

/* ============================================
   CHECKBOXEN
   ============================================ */
.bk-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.bk-checkbox {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bk-bg);
    border: 2px solid var(--bk-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bk-checkbox:hover {
    border-color: var(--bk-primary-light);
}

.bk-checkbox input {
    width: 24px;
    height: 24px;
    accent-color: var(--bk-primary);
    cursor: pointer;
}

.bk-checkbox input:checked ~ .bk-checkbox-content {
    color: var(--bk-primary);
}

.bk-checkbox-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 16px;
}

.bk-checkbox-label {
    font-weight: 500;
}

.bk-checkbox-preis {
    font-size: 0.9rem;
    color: var(--bk-text-muted);
    white-space: nowrap;
}

/* ============================================
   ERGEBNIS
   ============================================ */
.bk-ergebnis {
    background: linear-gradient(135deg, var(--bk-primary) 0%, var(--bk-primary-dark) 100%);
    color: #ffffff;
    padding: calc(var(--bk-spacing) * 1.5);
    border-radius: var(--bk-radius);
    margin-top: calc(var(--bk-spacing) * 2);
}

.bk-ergebnis h3 {
    font-size: 1.5rem;
    margin: 0 0 var(--bk-spacing) 0;
    text-align: center;
    color: #ffffff !important;
}

.bk-ergebnis-label,
.bk-ergebnis-wert,
.bk-ergebnis-hint {
    color: #ffffff;
}

.bk-ergebnis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: var(--bk-spacing);
}

.bk-ergebnis-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.bk-ergebnis-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.bk-ergebnis-wert {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
}

.bk-ergebnis-wert.bk-highlight {
    color: #86efac;  /* Grün für Honorar */
    font-size: 2rem;
}

/* ============================================
   DETAILS-TABELLE
   ============================================ */
.bk-ergebnis-details {
    background: white;
    color: var(--bk-text);
    padding: var(--bk-spacing);
    border-radius: 10px;
    margin-bottom: var(--bk-spacing);
}

.bk-ergebnis-details h4 {
    margin: 0 0 16px 0;
    color: var(--bk-primary);
}

.bk-details-table {
    width: 100%;
    border-collapse: collapse;
}

.bk-details-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--bk-border);
}

.bk-details-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.bk-details-table .bk-subtotal td {
    border-bottom: 1px dashed var(--bk-border);
    font-weight: 500;
}

.bk-details-table .bk-total td {
    border-bottom: none;
    border-top: 2px solid var(--bk-primary);
    padding-top: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bk-primary);
}

/* ============================================
   PROJEKT-BOX (Investition / Pauschale)
   ============================================ */
.bk-projekt-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: var(--bk-spacing) 0;
}

.bk-projekt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bk-projekt-header h4 {
    margin: 0;
    color: #92400e;
    font-size: 1.2rem;
}

.bk-projekt-info {
    cursor: help;
    font-size: 1.2rem;
}

.bk-projekt-content {
    color: #78350f;
}

.bk-projekt-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 12px;
}

.bk-projekt-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.bk-projekt-wert {
    font-size: 1.75rem;
    font-weight: 700;
    color: #b45309;
}

.bk-projekt-erklaerung {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   TRANSPARENZ-HINWEIS
   ============================================ */
.bk-transparenz {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: var(--bk-spacing);
}

.bk-transparenz p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* ============================================
   ERGEBNIS-HINTS (z.B. Ct/Seite)
   ============================================ */
.bk-ergebnis-hint {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* ============================================
   FIELDSET-INFO (Empfehlungshinweis)
   ============================================ */
.bk-fieldset-info {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #166534;
    border-radius: 0 6px 6px 0;
}

/* ============================================
   CTA (Call-to-Action)
   ============================================ */
.bk-cta {
    text-align: center;
    padding-top: var(--bk-spacing);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bk-cta-text {
    font-size: 1.1rem;
    margin: 0 0 var(--bk-spacing) 0;
}

.bk-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.bk-cta-address {
    margin-top: var(--bk-spacing);
    padding-top: var(--bk-spacing);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

.bk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 180px;
    justify-content: center;
}

.bk-btn-primary {
    background: var(--bk-accent);
    color: white;
}

.bk-btn-primary:hover {
    background: var(--bk-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.bk-btn-secondary {
    background: white;
    color: var(--bk-primary);
}

.bk-btn-secondary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --bk-font-size: 16px;
        --bk-spacing: 16px;
    }
    
    .bk-options {
        grid-template-columns: 1fr 1fr;
    }
    
    .bk-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .bk-ergebnis-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .bk-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bk-options {
        grid-template-columns: 1fr;
    }
    
    .bk-ergebnis-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bk-option-content,
    .bk-checkbox {
        border-width: 3px;
    }
    
    .bk-ergebnis-box {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* Focus für Tastaturnavigation */
*:focus-visible {
    outline: 3px solid var(--bk-accent);
    outline-offset: 2px;
}

/* ============================================
   HILFE-TOOLTIPS (bei Hover/Klick sichtbar)
   ============================================ */

/* Hilfe-Toggle Icon */
.bk-hilfe-toggle {
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.7;
    margin-left: 8px;
    position: relative;
    display: inline-block;
}

.bk-hilfe-toggle:hover {
    opacity: 1;
}

/* Tooltip: Standardmäßig versteckt */
.bk-hilfe-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    background: #1e3a5f;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: normal;
    color: #ffffff;
    width: 280px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    line-height: 1.5;
}

.bk-hilfe-tooltip strong {
    color: #93c5fd;
}

.bk-hilfe-tooltip em {
    color: #fde68a;
}

/* Tooltip bei Hover über Icon anzeigen */
.bk-hilfe-toggle:hover .bk-hilfe-tooltip,
.bk-hilfe-tooltip.bk-visible {
    display: block;
}

/* Tooltips haben jetzt alle Erklärungen */

/* ============================================
   KONTAKTDATEN-BOX
   ============================================ */
.bk-kontakt-box {
    background: var(--bk-bg-card);
    border: 2px solid var(--bk-primary);
    border-radius: var(--bk-radius);
    padding: 24px;
    margin: 24px 0;
}

.bk-kontakt-box h3 {
    margin: 0 0 8px 0;
    color: var(--bk-primary);
    font-size: 1.2rem;
}

.bk-kontakt-hinweis {
    margin: 0 0 16px 0;
    color: var(--bk-text-light);
    font-size: 0.95rem;
}

.bk-kontakt-felder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .bk-kontakt-felder {
        grid-template-columns: 1fr;
    }
}

.bk-feld label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--bk-text);
}

.bk-pflicht {
    color: #dc2626;
}

.bk-feld input[type="text"],
.bk-feld input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--bk-border);
    border-radius: var(--bk-radius-sm);
    transition: border-color 0.2s;
}

.bk-feld input:focus {
    border-color: var(--bk-primary);
    outline: none;
}

/* Großer CTA Button */
.bk-btn-gross {
    font-size: 1.3rem;
    padding: 18px 40px;
    width: 100%;
    max-width: 400px;
}

.bk-cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

