/**
 * MFM LED Ersparnis-Rechner Styles
 * Version: 1.3.0.1
 */

/* Universal Box-Sizing für Plugin */
.mfm-led-rechner-wrapper,
.mfm-led-rechner-wrapper *,
.mfm-led-rechner-wrapper *::before,
.mfm-led-rechner-wrapper *::after {
    box-sizing: border-box;
}

/* Wrapper & Container */
.mfm-led-rechner-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
    width: 100%;
}

.mfm-led-rechner-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

/* Title & Intro */
.mfm-led-rechner-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    text-align: center;
}

.mfm-led-rechner-intro {
    color: #64748b;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Form Styles */
.mfm-led-rechner-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mfm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mfm-form-row {
    display: flex;
    gap: 20px;
}

.mfm-form-half {
    flex: 1;
}

.mfm-form-group label {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfm-label-icon {
    font-size: 18px;
}

.mfm-form-group input,
.mfm-form-group select {
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.mfm-form-group input:focus,
.mfm-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.mfm-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    background-color: rgba(255, 255, 255, 0.1);
}

.mfm-form-group select option {
    background: #1e293b;
    color: #ffffff;
    padding: 12px;
}

.mfm-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mfm-form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Submit Button */
.mfm-led-submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.mfm-led-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.mfm-btn-icon {
    font-size: 20px;
}

/* Ergebnis-Bereich */
.mfm-led-ergebnis {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
    animation: fadeIn 0.5s ease;
}

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

.mfm-ergebnis-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 32px;
}

/* Ergebnis Cards */
.mfm-ergebnis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.mfm-ergebnis-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mfm-card-header {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.mfm-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mfm-vergleich-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Standard Label/Value für Cards */
.mfm-label,
.mfm-value {
    color: #e2e8f0;
}

.mfm-label-alt,
.mfm-value-alt {
    color: #ef4444;
}

.mfm-label-led,
.mfm-value-led {
    color: #22c55e;
}

.mfm-ersparnis-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.mfm-label-ersparnis,
.mfm-value-ersparnis {
    color: #3b82f6;
    font-weight: 700;
}

.mfm-value-ersparnis {
    font-size: 16px;
}

.mfm-foerderung-row {
    background: #f0fdf4;
    margin: 8px -12px;
    padding: 8px 12px;
    border-radius: 6px;
}

.mfm-label-foerderung,
.mfm-value-foerderung {
    color: #16a34a;
    font-weight: 600;
}

.mfm-value-highlight {
    font-weight: 700;
    color: #ffffff;
    font-size: 16px;
}

.mfm-amortisation-row {
    background: #eff6ff;
    margin: 8px -12px -8px -12px;
    padding: 12px;
    border-radius: 0 0 8px 8px;
}

.mfm-label-amortisation,
.mfm-value-amortisation {
    color: #2563eb;
    font-weight: 700;
}

/* Highlight Box */
.mfm-highlight-box {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.mfm-highlight-label {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.mfm-highlight-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
}

.mfm-highlight-sub {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 8px;
}

/* HERO: Jährliche Kostenersparnis - Hauptverkaufsargument */
.mfm-hero-ersparnis {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.3);
    overflow: hidden;
    max-width: 100%;
}

.mfm-hero-label {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mfm-hero-value {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}

.mfm-hero-sub {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 8px;
}

/* Langzeit-Box (dezent) */
.mfm-langzeit-box {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: rgba(128, 128, 128, 0.1);
    border-radius: 12px;
}

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

.mfm-langzeit-label {
    font-size: 14px;
    color: #64748b;
}

.mfm-langzeit-value {
    font-size: 15px;
    font-weight: 600;
    color: #22c55e;
}

/* CO2 Info (jetzt in Langzeit-Box integriert) */

/* Förderhinweis */
.mfm-foerderung-hinweis {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.mfm-foerderung-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 16px;
    color: #854d0e;
}

.mfm-foerderung-icon {
    font-size: 20px;
}

.mfm-foerderung-hinweis p {
    color: #713f12;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.mfm-foerderung-note {
    color: #a16207;
    margin-top: 12px !important;
}

/* CTA Section */
.mfm-cta-section {
    text-align: center;
    padding: 32px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.mfm-cta-section > p:first-child {
    font-size: 18px;
    color: #475569;
    margin: 0 0 20px 0;
}

.mfm-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mfm-cta-button:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.mfm-cta-sub {
    font-size: 14px;
    color: #94a3b8;
    margin: 16px 0 0 0;
}

/* Responsive */
@media (max-width: 640px) {
    .mfm-led-rechner-container {
        padding: 24px;
    }
    
    .mfm-led-rechner-title {
        font-size: 22px;
    }
    
    .mfm-form-row {
        flex-direction: column;
        gap: 24px;
    }
    
    .mfm-highlight-value {
        font-size: 32px;
    }
    
    .mfm-ergebnis-cards {
        grid-template-columns: 1fr;
    }
    
    .mfm-lead-form-row {
        flex-direction: column;
    }
}

/* Lead Formular */
.mfm-lead-form {
    margin: 24px 0;
}

.mfm-lead-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.mfm-lead-form-row .mfm-form-group {
    flex: 1;
}

.mfm-lead-form .mfm-form-group label {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mfm-lead-form .mfm-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.mfm-lead-form .mfm-form-group input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.mfm-lead-form .mfm-form-group input::placeholder {
    color: #94a3b8;
}

.mfm-lead-privacy {
    text-align: center;
    color: #94a3b8;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
}

/* Lead Success */
.mfm-lead-success {
    text-align: center;
    padding: 24px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    margin: 24px 0;
}

.mfm-success-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.mfm-lead-success p {
    margin: 0;
    color: #166534;
}

.mfm-lead-success p:first-of-type {
    font-size: 18px;
    margin-bottom: 8px;
}

/* CTA Button im Lead-Formular */
.mfm-lead-form .mfm-cta-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mfm-lead-form .mfm-cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================
   Multi-Leuchten-Konfiguration (v1.2.0.11)
   ========================================== */

/* Section Headers */
.mfm-section-header {
    margin-bottom: 16px;
}

.mfm-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfm-section-header-params {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Leuchten-Liste */
.mfm-leuchten-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Spaltenüberschriften */
.mfm-leuchten-header {
    display: flex;
    gap: 16px;
    padding: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.mfm-leuchten-header .mfm-label-icon {
    font-size: 14px;
}

.mfm-header-typ {
    flex: 1;
}

.mfm-header-anzahl {
    width: 100px;
    text-align: center;
}

.mfm-header-actions {
    width: 40px;
}

.mfm-leuchten-liste {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Einzelne Leuchten-Zeile */
.mfm-leuchte-row {
    display: flex;
    gap: 16px;
    align-items: center;
    max-width: 100%;
}

.mfm-leuchte-select {
    flex: 1;
    min-width: 0;
}

.mfm-leuchte-select select {
    width: 100%;
    max-width: 100%;
}

.mfm-leuchte-anzahl {
    flex-shrink: 0;
    width: 100px;
}

.mfm-leuchte-anzahl input {
    width: 100%;
    text-align: center;
}

/* Input/Select Styles für Leuchten-Zeilen (ohne .mfm-form-group) */
.mfm-leuchte-select select,
.mfm-leuchte-anzahl input {
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.mfm-leuchte-select select:focus,
.mfm-leuchte-anzahl input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.mfm-leuchte-select select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    background-color: rgba(255, 255, 255, 0.1);
}

.mfm-leuchte-select select option {
    background: #1e293b;
    color: #ffffff;
    padding: 12px;
}

.mfm-leuchte-anzahl input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Aktionen (Löschen-Button) */
.mfm-leuchte-actions {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfm-remove-leuchte {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfm-remove-leuchte:hover:not(:disabled) {
    background: #fee2e2;
    color: #dc2626;
}

.mfm-remove-leuchte:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Hinzufügen-Button - sehr dezent */
.mfm-add-leuchte-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.mfm-add-leuchte-btn:hover {
    color: #64748b;
}

.mfm-add-leuchte-btn .mfm-btn-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* Zusammenfassung - dezent */
.mfm-zusammenfassung {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.mfm-zf-label {
    font-size: 13px;
    color: #64748b;
}

.mfm-zf-value {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* Betriebsparameter - 3 Spalten */
.mfm-form-third {
    flex: 1;
}

/* Erfasste Leuchten (im Ergebnis) */
.mfm-erfasste-leuchten {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.mfm-erfasste-leuchten h4 {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mfm-erfasste-leuchten ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mfm-erfasste-leuchten li {
    font-size: 14px;
    color: #334155;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.mfm-erfasste-leuchten li strong {
    color: #1e293b;
}

.mfm-summary-detail {
    color: #64748b;
    font-size: 12px;
    margin-left: 8px;
}

/* Responsive für Multi-Leuchten */
@media (max-width: 600px) {
    .mfm-led-rechner-wrapper {
        padding: 10px;
    }
    
    .mfm-led-rechner-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .mfm-leuchten-header {
        display: none;
    }
    
    .mfm-leuchte-row {
        flex-wrap: wrap;
    }
    
    .mfm-leuchte-select {
        flex: 1 1 100%;
        min-width: 0;
    }
    
    .mfm-leuchte-anzahl {
        flex: 1;
    }
    
    .mfm-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .mfm-hero-ersparnis {
        padding: 24px 16px;
        border-radius: 12px;
    }
    
    .mfm-hero-value {
        font-size: 36px;
    }
    
    .mfm-langzeit-box {
        flex-direction: column;
        gap: 12px;
    }
    
    .mfm-ergebnis-cards {
        grid-template-columns: 1fr;
    }
    
    .mfm-led-rechner-title {
        font-size: 22px;
    }
}
