/* BMI Rechner Plus - Modern SAAS Style */
:root {
    --bmi-primary: #10b981;
    --bmi-primary-light: #34d399;
    --bmi-primary-dark: #059669;
    --bmi-secondary: #6366f1;
    --bmi-bg-light: #f9fafb;
    --bmi-bg-white: #ffffff;
    --bmi-text-primary: #111827;
    --bmi-text-secondary: #6b7280;
    --bmi-border: #e5e7eb;
    --bmi-success: #10b981;
    --bmi-warning: #f59e0b;
    --bmi-error: #ef4444;
    --bmi-info: #3b82f6;
    --bmi-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --bmi-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --bmi-radius: 12px;
    --bmi-radius-lg: 16px;
}

.bmi-rechner-plus-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.bmi-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.bmi-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    padding: 16px;
    background: linear-gradient(135deg, var(--bmi-primary), var(--bmi-primary-light));
    border-radius: var(--bmi-radius-lg);
    color: white;
    box-shadow: var(--bmi-shadow-lg);
}

.bmi-icon svg {
    width: 100%;
    height: 100%;
}

.bmi-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bmi-text-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.bmi-subtitle {
    font-size: 1rem;
    color: var(--bmi-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Form Container */
#bmi-rechner-form {
    background: var(--bmi-bg-white);
    border-radius: var(--bmi-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--bmi-shadow-lg);
    border: 1px solid var(--bmi-border);
}

/* Form Grid */
.bmi-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Form Groups */
.bmi-form-group {
    position: relative;
}

.bmi-form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bmi-text-primary);
    margin-bottom: 0.5rem;
}

.field-icon {
    width: 18px;
    height: 18px;
    color: var(--bmi-primary);
}

.required {
    color: var(--bmi-error);
    margin-left: 0.25rem;
}

.bmi-form-group input[type="number"],
.bmi-form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--bmi-text-primary);
    background: var(--bmi-bg-light);
    border: 2px solid transparent;
    border-radius: var(--bmi-radius);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.bmi-form-group input[type="number"]:hover,
.bmi-form-group select:hover {
    background: var(--bmi-bg-white);
    border-color: var(--bmi-border);
}

.bmi-form-group input[type="number"]:focus,
.bmi-form-group select:focus {
    background: var(--bmi-bg-white);
    border-color: var(--bmi-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Submit Button */
.bmi-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--bmi-primary), var(--bmi-primary-light));
    border: none;
    border-radius: var(--bmi-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bmi-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.bmi-submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.bmi-submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Results Section */
#bmi-rechner-ergebnis {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--bmi-radius-lg);
    border: 2px solid var(--bmi-primary);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    background: var(--bmi-primary);
    border-radius: 12px;
    color: white;
}

.result-icon svg {
    width: 100%;
    height: 100%;
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bmi-text-primary);
    margin: 0;
}

/* BMI Value Display */
.bmi-value-display {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--bmi-radius);
    margin-bottom: 2rem;
    box-shadow: var(--bmi-shadow);
}

.bmi-value-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bmi-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.bmi-value-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--bmi-primary);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.bmi-value-interpretation {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bmi-text-primary);
    line-height: 1.5;
}

/* BMI Scale */
.bmi-scale {
    position: relative;
    margin: 2rem 0;
}

.scale-marker {
    position: absolute;
    top: -30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--bmi-text-primary);
    transform: translateX(-50%);
    transition: left 0.5s ease;
    z-index: 2;
}

.scale-bar {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--bmi-shadow);
}

.scale-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    position: relative;
}

.scale-segment::before {
    content: attr(data-label);
}

.scale-segment.underweight {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.scale-segment.normal {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.scale-segment.overweight {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.scale-segment.obese {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.scale-labels {
    display: flex;
    justify-content: space-around;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bmi-text-secondary);
}

/* Suggestions */
.bmi-suggestions {
    margin-top: 2rem;
}

.bmi-suggestions h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bmi-text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bmi-suggestions h4::before {
    content: '💡';
    font-size: 1.5rem;
}

.bmi-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.bmi-suggestions li {
    padding: 1rem;
    background: white;
    border-radius: var(--bmi-radius);
    border-left: 4px solid var(--bmi-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--bmi-text-primary);
    box-shadow: var(--bmi-shadow);
}

/* CTA Box */
.bmi-cta-box,
.bmi-cta-box-preview {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--bmi-radius-lg);
    border: 2px solid #f59e0b;
    box-shadow: var(--bmi-shadow-lg);
}

.cta-icon,
.cta-icon-preview {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: white;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: var(--bmi-shadow);
}

.cta-content,
.cta-content-preview {
    flex: 1;
}

.cta-content h4,
.cta-content-preview h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #92400e;
    line-height: 1.4;
}

.cta-button,
.cta-button-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: #f59e0b;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cta-button:hover,
.cta-button:focus {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: white;
    text-decoration: none;
}

.cta-button .arrow,
.cta-button-preview .arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .bmi-rechner-plus-container {
        margin: 1rem;
    }

    #bmi-rechner-form {
        padding: 1.5rem;
    }

    .bmi-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bmi-header h2 {
        font-size: 1.5rem;
    }

    .bmi-value-number {
        font-size: 3rem;
    }

    .scale-labels {
        font-size: 0.625rem;
    }

    .scale-segment::before {
        display: none;
    }
    
    .bmi-cta-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#bmi-rechner-ergebnis:not(.hidden) {
    animation: slideIn 0.5s ease;
}

/* Loading State */
.bmi-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.bmi-submit-btn.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '...'; }
    40% { content: '..'; }
    60% { content: '.'; }
    80%, 100% { content: ''; }
}