/* ═══════════════════════════════════════════════════════════════════
   Solar Rechner – Frontend CSS
   Präfix: html body #solar-rechner  → maximale Spezifität
   Alle Farben hardcoded → keine Theme-Variablen-Interferenz
   ═══════════════════════════════════════════════════════════════════ */

/* Farb-Konstanten (nur für Lesbarkeit, nicht für !important-Regeln):
   Primär:       #2E7D62
   Primär-Dark:  #1a5c48
   Primär-Light: rgba(46,125,98,.12)
   Text:         #1a1a1a
   Text-Muted:   #666666
   Border:       #e0e0e0
*/

/* ── Wrapper ──────────────────────────────────────────────────────── */
#solar-rechner {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 780px;
    margin: 0 auto 48px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    overflow: hidden;
    color: #1a1a1a;
    box-sizing: border-box;
}
#solar-rechner *, #solar-rechner *::before, #solar-rechner *::after {
    box-sizing: border-box;
}

/* ── Fortschrittsbalken ───────────────────────────────────────────── */
#solar-rechner .sr-progress-bar {
    height: 5px;
    background: #e0e0e0;
}
#solar-rechner .sr-progress-inner {
    height: 100%;
    background: #2E7D62;
    transition: width .5s ease;
    width: 25%;
}

#solar-rechner .sr-steps-nav {
    display: flex;
    justify-content: space-around;
    padding: 16px 24px 0;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

#solar-rechner .sr-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    opacity: .45;
    transition: opacity .25s ease;
}
#solar-rechner .sr-step-dot.active { opacity: 1; }
#solar-rechner .sr-step-dot.done   { opacity: .75; }

html body #solar-rechner .sr-step-dot span {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #dddddd !important;
    border: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: background .25s ease !important;
}
html body #solar-rechner .sr-step-dot.active span { background: #2E7D62 !important; }
html body #solar-rechner .sr-step-dot.done span   { background: #1a5c48 !important; }

#solar-rechner .sr-step-dot small {
    font-size: 11px;
    color: #666666;
    font-weight: 500;
    padding-bottom: 10px;
}

/* ── Steps ────────────────────────────────────────────────────────── */
#solar-rechner .sr-step {
    padding: 36px 40px 40px;
    animation: srFadeIn .35s ease forwards;
}
@keyframes srFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

#solar-rechner .sr-hidden { display: none !important; }

#solar-rechner .sr-step-icon { font-size: 44px; text-align: center; margin-bottom: 10px; line-height: 1; }
#solar-rechner .sr-step-title { font-size: 26px; font-weight: 800; text-align: center; margin: 0 0 8px; color: #1a1a1a; }
#solar-rechner .sr-step-sub   { text-align: center; color: #666666; margin: 0 0 28px; font-size: 15px; }

/* ── Live-Banner ──────────────────────────────────────────────────── */
#solar-rechner .sr-live-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #2E7D62 0%, #1a5c48 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    color: #fff;
    min-height: 70px;
    position: relative;
    overflow: hidden;
}
#solar-rechner .sr-live-banner::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,.07);
    border-radius: 50%;
}
#solar-rechner .sr-live-sun {
    font-size: 36px; line-height: 1;
    animation: sr-sun-spin 8s linear infinite;
    flex-shrink: 0;
}
@keyframes sr-sun-spin {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}
#solar-rechner .sr-live-text  { flex: 1; display: flex; flex-direction: column; gap: 3px; }
#solar-rechner .sr-live-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
#solar-rechner .sr-live-amount { font-size: 20px; font-weight: 900; line-height: 1.2; transition: all .3s ease; }
#solar-rechner .sr-live-badge  { background: rgba(255,255,255,.2); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ── Haushalt-Auswahl ─────────────────────────────────────────────── */
#solar-rechner .sr-household-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

html body #solar-rechner .sr-household-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 20px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    cursor: pointer !important;
    transition: all .25s ease !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-align: center !important;
    width: 100% !important;
    outline: none !important;
}
html body #solar-rechner .sr-household-btn:hover,
html body #solar-rechner .sr-household-btn.selected {
    border-color: #2E7D62 !important;
    background: rgba(46,125,98,.10) !important;
    box-shadow: 0 0 0 3px rgba(46,125,98,.15) !important;
    color: #1a5c48 !important;
}

#solar-rechner .sr-hh-icon { font-size: 32px; line-height: 1; }
html body #solar-rechner .sr-household-btn strong { font-size: 15px; color: inherit !important; display: block; }
html body #solar-rechner .sr-household-btn > span { font-size: 13px; color: #666666 !important; }

/* ── Inputs ───────────────────────────────────────────────────────── */
#solar-rechner .sr-manual-input,
#solar-rechner .sr-form-row { margin-bottom: 20px; }

#solar-rechner .sr-manual-input label,
#solar-rechner .sr-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; color: #1a1a1a; }

#solar-rechner .sr-input-group { display: flex; align-items: center; max-width: 240px; }

html body #solar-rechner .sr-input {
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    width: 100% !important;
    color: #1a1a1a !important;
    background: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .25s ease, box-shadow .25s ease !important;
}
html body #solar-rechner .sr-input-group .sr-input {
    border-radius: 8px 0 0 8px !important;
    border-right: none !important;
}
html body #solar-rechner .sr-input:focus {
    border-color: #2E7D62 !important;
    box-shadow: 0 0 0 3px rgba(46,125,98,.15) !important;
}

#solar-rechner .sr-unit {
    background: #f0f0f0;
    border: 1.5px solid #e0e0e0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 14px;
    color: #666666;
    white-space: nowrap;
    flex-shrink: 0;
}
#solar-rechner .sr-field-hint { font-size: 12px; color: #666666; margin-top: 6px; }
#solar-rechner textarea.sr-input { resize: vertical; min-height: 80px; }

/* ── Toggle ───────────────────────────────────────────────────────── */
#solar-rechner .sr-option-row { margin-bottom: 20px; }
#solar-rechner .sr-toggle-label { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: #1a1a1a; }
#solar-rechner .sr-toggle-input { display: none !important; }

#solar-rechner .sr-toggle-switch {
    width: 44px; height: 24px;
    background: #cccccc;
    border-radius: 12px;
    position: relative; flex-shrink: 0;
    transition: background .25s ease;
    border: none !important;
    box-shadow: none !important;
}
#solar-rechner .sr-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left .25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
#solar-rechner .sr-toggle-input:checked + .sr-toggle-switch { background: #2E7D62; }
#solar-rechner .sr-toggle-input:checked + .sr-toggle-switch::after { left: 23px; }

/* ── Hint-Box ─────────────────────────────────────────────────────── */
#solar-rechner .sr-hint-box {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fffbea; border: 1px solid #f0d060 !important;
    border-radius: 8px; padding: 12px 16px;
    font-size: 13px; color: #7a6010; margin-bottom: 24px;
}

/* ── Ausrichtungs-Buttons ─────────────────────────────────────────── */
#solar-rechner .sr-orientation-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}

html body #solar-rechner .sr-orient-btn {
    padding: 14px 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all .25s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    width: 100% !important;
    text-align: center !important;
    line-height: 1.3 !important;
    outline: none !important;
}
html body #solar-rechner .sr-orient-btn small {
    font-weight: 400 !important;
    color: #666666 !important;
    font-size: 12px !important;
    display: block !important;
}
html body #solar-rechner .sr-orient-btn.active,
html body #solar-rechner .sr-orient-btn:hover {
    border-color: #2E7D62 !important;
    background: rgba(46,125,98,.10) !important;
    color: #1a5c48 !important;
    box-shadow: none !important;
}
html body #solar-rechner .sr-orient-btn.active small,
html body #solar-rechner .sr-orient-btn:hover small {
    color: #1a5c48 !important;
}

/* ── Primär-Buttons (Weiter / Submit) ─────────────────────────────── */
html body #solar-rechner .sr-btn-next,
html body #solar-rechner .sr-btn-submit {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #2E7D62 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    transition: background .25s ease, transform .15s ease !important;
    outline: none !important;
}
html body #solar-rechner .sr-btn-next:hover,
html body #solar-rechner .sr-btn-submit:hover {
    background: #1a5c48 !important;
    color: #ffffff !important;
    border: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(46,125,98,.35) !important;
}
html body #solar-rechner .sr-btn-next:disabled {
    background: #aaaaaa !important;
    color: #ffffff !important;
    border: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Pulsierender CTA */
html body #solar-rechner .sr-btn-pulse {
    animation: sr-pulse 2.2s ease-in-out infinite;
}
@keyframes sr-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(46,125,98,.5); }
    50%      { box-shadow: 0 0 0 10px rgba(46,125,98,0); }
}

#solar-rechner .sr-arrow { transition: transform .25s ease; display: inline-block; }
html body #solar-rechner .sr-btn-next:not(:disabled):hover .sr-arrow { transform: translateX(4px); }

/* ── Zurück-Button ────────────────────────────────────────────────── */
html body #solar-rechner .sr-btn-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: transparent !important;
    color: #666666 !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 13px 20px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    transition: all .25s ease !important;
    outline: none !important;
}
html body #solar-rechner .sr-btn-back:hover {
    border-color: #2E7D62 !important;
    color: #2E7D62 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#solar-rechner .sr-nav-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-top: 28px; gap: 12px;
}

/* ── Hero-Ergebnis ────────────────────────────────────────────────── */
#solar-rechner .sr-result-hero {
    position: relative;
    background: linear-gradient(135deg, #2E7D62 0%, #1a5c48 100%);
    border-radius: 12px;
    padding: 36px 24px 32px;
    text-align: center;
    margin-bottom: 24px;
    overflow: hidden;
}
#solar-rechner .sr-result-hero-rays::before,
#solar-rechner .sr-result-hero-rays::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: sr-hero-ring 3s ease-in-out infinite;
}
#solar-rechner .sr-result-hero-rays::before { width: 200px; height: 200px; background: rgba(255,255,255,.06); }
#solar-rechner .sr-result-hero-rays::after  { width: 320px; height: 320px; background: rgba(255,255,255,.03); animation-delay: .5s; }
@keyframes sr-hero-ring {
    0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .7; }
    50%      { transform: translate(-50%,-50%) scale(1.15); opacity: .2; }
}
#solar-rechner .sr-result-hero-inner { position: relative; z-index: 1; }
#solar-rechner .sr-result-hero-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.75); margin-bottom: 8px; }
#solar-rechner .sr-result-hero-value { font-size: 58px; font-weight: 900; color: #ffffff; line-height: 1; margin-bottom: 8px; text-shadow: 0 2px 16px rgba(0,0,0,.15); }
#solar-rechner .sr-result-hero-sub   { font-size: 14px; color: rgba(255,255,255,.7); }

/* ── Ergebnis-Karten ──────────────────────────────────────────────── */
#solar-rechner .sr-results-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px;
}
#solar-rechner .sr-result-card {
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 20px 18px !important;
    text-align: center !important;
    background: #ffffff !important;
    transition: box-shadow .25s ease;
}
#solar-rechner .sr-result-card:hover {
    box-shadow: 0 4px 16px rgba(46,125,98,.12) !important;
    border-color: #2E7D62 !important;
}
#solar-rechner .sr-result-icon  { font-size: 28px; margin-bottom: 6px; }
#solar-rechner .sr-result-label { font-size: 13px; font-weight: 600; opacity: .75; margin-bottom: 4px; }
#solar-rechner .sr-result-value { font-size: 36px; font-weight: 900; line-height: 1.1; color: #2E7D62; }
#solar-rechner .sr-result-sub   { font-size: 12px; color: #666666; margin-top: 4px; }

/* ── Chart ────────────────────────────────────────────────────────── */
#solar-rechner .sr-chart-wrap { background: #f7faf9; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
#solar-rechner .sr-chart-wrap h3 { margin: 0 0 16px; font-size: 14px; color: #666666; font-weight: 600; }
#solar-rechner .sr-chart { position: relative; height: 120px; display: flex; align-items: flex-end; gap: 3px; }
#solar-rechner .sr-chart-bars { display: flex; align-items: flex-end; gap: 3px; flex: 1; height: 100%; }

html body #solar-rechner .sr-bar {
    flex: 1 !important;
    background: #2E7D62 !important;
    border-radius: 3px 3px 0 0 !important;
    opacity: .7 !important;
    min-height: 4px !important;
    transition: height .5s ease, opacity .25s ease !important;
    border: none !important;
}
html body #solar-rechner .sr-bar:hover { opacity: 1 !important; }
html body #solar-rechner .sr-bar.break-even { opacity: 1 !important; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2E7D62 !important; }

#solar-rechner .sr-chart-line { position: absolute; left: 0; right: 0; height: 2px; background: #e74c3c; pointer-events: none; }
#solar-rechner .sr-chart-x-labels { position: absolute; bottom: -20px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 10px; color: #666666; }
#solar-rechner .sr-chart-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666666; margin-top: 28px; }
#solar-rechner .sr-legend-green { display: inline-block; width: 14px; height: 14px; background: #2E7D62; border-radius: 3px; opacity: .7; }
#solar-rechner .sr-legend-red   { display: inline-block; width: 14px; height: 2px; background: #e74c3c; vertical-align: middle; }

/* ── CO₂ / Hinweise ───────────────────────────────────────────────── */
#solar-rechner .sr-result-cta {
    text-align: center; font-size: 14px; color: #666666;
    background: #fffbea; border: 1px solid #f0d060 !important;
    border-radius: 8px; padding: 14px 18px; margin-bottom: 4px;
}

/* ── Kontakt-Summary ──────────────────────────────────────────────── */
#solar-rechner .sr-contact-summary {
    display: flex; flex-wrap: wrap; gap: 10px;
    background: rgba(46,125,98,.10);
    border-radius: 8px; padding: 14px 18px; margin-bottom: 22px; font-size: 13px;
    border: none !important;
}
html body #solar-rechner .sr-contact-summary span {
    background: #2E7D62 !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-weight: 600 !important;
    border: none !important;
}

/* ── Form ─────────────────────────────────────────────────────────── */
#solar-rechner .sr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
#solar-rechner .sr-field { display: flex; flex-direction: column; gap: 6px; }
#solar-rechner .sr-field label { font-size: 13px; font-weight: 600; color: #1a1a1a; }
#solar-rechner .sr-field-full { margin-bottom: 14px; }
#solar-rechner .sr-req { color: #2E7D62; }

#solar-rechner .sr-privacy-label {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: #666666; margin-bottom: 6px; cursor: pointer; line-height: 1.5;
}
#solar-rechner .sr-privacy-label a { color: #2E7D62; text-decoration: underline; }
#solar-rechner .sr-privacy-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: #2E7D62; }

#solar-rechner .sr-form-error {
    background: #fde8e8; border: 1px solid #f5a0a0 !important;
    border-radius: 8px; padding: 12px 16px; font-size: 14px; color: #c0392b; margin-bottom: 12px;
}

html body #solar-rechner .sr-btn-submit { min-width: 220px; justify-content: center !important; }

/* ── Loader ───────────────────────────────────────────────────────── */
#solar-rechner .sr-loader {
    width: 18px; height: 18px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: srSpin .7s linear infinite;
    display: inline-block;
}
@keyframes srSpin { to { transform: rotate(360deg); } }

/* ── Trust ────────────────────────────────────────────────────────── */
#solar-rechner .sr-trust-row {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 16px; margin-top: 18px; font-size: 13px; color: #666666;
}

/* ── Konfetti ─────────────────────────────────────────────────────── */
#solar-rechner .sr-success-confetti { position: absolute; top: 0; left: 0; right: 0; height: 200px; pointer-events: none; overflow: hidden; }
.sr-confetti-piece {
    position: absolute; width: 8px; height: 8px; top: -10px; border-radius: 2px;
    animation: sr-confetti-fall linear forwards;
}
@keyframes sr-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(220px) rotate(720deg); opacity: 0; }
}

/* ── Erfolg ───────────────────────────────────────────────────────── */
#solar-rechner .sr-success-wrap { text-align: center; padding: 20px 0; }
#solar-rechner .sr-success-icon { font-size: 64px; margin-bottom: 16px; animation: srBounce .6s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes srBounce { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-16px); } }
#solar-rechner .sr-success-wrap h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; color: #1a1a1a; }
#solar-rechner .sr-success-wrap p  { color: #666666; font-size: 16px; margin-bottom: 24px; }
#solar-rechner .sr-success-contact { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
    #solar-rechner .sr-step { padding: 24px 20px 28px; }
    #solar-rechner .sr-step-title { font-size: 20px; }
    #solar-rechner .sr-household-grid,
    #solar-rechner .sr-results-grid,
    #solar-rechner .sr-form-grid,
    #solar-rechner .sr-orientation-grid { grid-template-columns: 1fr; }
    #solar-rechner .sr-result-hero-value { font-size: 40px; }
    #solar-rechner .sr-nav-row { flex-direction: column; }
    html body #solar-rechner .sr-btn-next,
    html body #solar-rechner .sr-btn-back,
    html body #solar-rechner .sr-btn-submit { width: 100% !important; justify-content: center !important; }
    #solar-rechner .sr-trust-row { gap: 10px; font-size: 12px; }
}
