/**
 * WishBerry Modal System - Zentrale Styles (v8.2.1-hotfix-12)
 * 
 * Änderungen in hotfix-12:
 * - Header-Höhe erhöht (padding: 28px 32px statt 24px)
 * - Header-Titel fett (font-weight: 700)
 * - Register-Modal breiter (--wb-modal-lg: 600px)
 * - 2-spaltige Passwort-Anforderungen
 * - Formular-Zeilen für nebeneinander-Layout
 */

/* ============================================
   CSS Custom Properties (Variablen)
   ============================================ */
:root {
    /* Primärfarben */
    --wb-primary: #ff8c42;
    --wb-primary-hover: #e67a32;
    --wb-primary-light: rgba(255, 140, 66, 0.1);
    
    /* Status-Farben */
    --wb-success: #10b981;
    --wb-success-light: rgba(16, 185, 129, 0.1);
    --wb-warning: #f59e0b;
    --wb-warning-light: rgba(245, 158, 11, 0.1);
    --wb-danger: #ef4444;
    --wb-danger-light: rgba(239, 68, 68, 0.1);
    --wb-info: #3b82f6;
    --wb-info-light: rgba(59, 130, 246, 0.1);
    
    /* Text-Farben */
    --wb-text: #111827;
    --wb-text-light: #6b7280;
    --wb-text-muted: #9ca3af;
    
    /* Hintergrund & Rahmen */
    --wb-bg: #ffffff;
    --wb-bg-light: #f9fafb;
    --wb-bg-dark: #f3f4f6;
    --wb-border: #e5e7eb;
    --wb-border-focus: #ff8c42;
    
    /* Schatten */
    --wb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --wb-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --wb-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --wb-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.25);
    
    /* Modal-Größen */
    --wb-modal-sm: 400px;
    --wb-modal-md: 500px;
    --wb-modal-lg: 600px;
    --wb-modal-xl: 800px;
    
    /* Animationen */
    --wb-transition-fast: 0.15s ease;
    --wb-transition: 0.3s ease;
    
    /* Border-Radius */
    --wb-radius-sm: 6px;
    --wb-radius: 8px;
    --wb-radius-lg: 12px;
    --wb-radius-xl: 20px;
}


/* ============================================
   Modal Base Styles
   ============================================ */
.wb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Overlay */
.wb-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Container */
.wb-modal__container {
    position: relative;
    background: var(--wb-bg);
    border-radius: var(--wb-radius-xl);
    width: 100%;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--wb-shadow-xl);
    animation: wbModalSlideIn 0.3s ease;
    overflow: hidden;
}

/* Größen-Varianten */
.wb-modal--sm .wb-modal__container { max-width: var(--wb-modal-sm); }
.wb-modal--md .wb-modal__container { max-width: var(--wb-modal-md); }
.wb-modal--lg .wb-modal__container { max-width: var(--wb-modal-lg); }
.wb-modal--xl .wb-modal__container { max-width: var(--wb-modal-xl); }

/* Animation */
@keyframes wbModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wbModalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.wb-modal--closing .wb-modal__container {
    animation: wbModalSlideOut 0.2s ease forwards;
}


/* ============================================
   Modal Header (v8.2.1-hotfix-12: höher + fett)
   ============================================ */
.wb-modal__header {
    color: white;
    padding: 28px 32px; /* Erhöht von 24px auf 28px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wb-modal__title {
    font-size: 1.5rem;
    font-weight: 700; /* Fett */
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wb-modal__emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.wb-modal__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: var(--wb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}


/* ============================================
   Modal Body
   ============================================ */
.wb-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

.wb-modal__subtitle {
    color: var(--wb-text-light);
    margin: 0 0 24px 0;
    font-size: 1rem;
}


/* ============================================
   Modal Footer
   ============================================ */
.wb-modal__footer {
    padding: 20px 32px;
    background: var(--wb-bg-light);
    border-top: 1px solid var(--wb-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}


/* ============================================
   Modal Buttons
   ============================================ */
.wb-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--wb-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wb-transition);
    font-family: inherit;
}

.wb-modal-btn--primary {
    background: var(--wb-primary);
    color: white;
}

.wb-modal-btn--primary:hover:not(:disabled) {
    background: var(--wb-primary-hover);
    transform: translateY(-1px);
}

.wb-modal-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wb-modal-btn--secondary {
    background: var(--wb-bg-dark);
    color: var(--wb-text-light);
}

.wb-modal-btn--secondary:hover {
    background: var(--wb-border);
}

.wb-modal-btn--danger {
    background: var(--wb-danger);
    color: white;
}

.wb-modal-btn--danger:hover {
    background: #dc2626;
}


/* ============================================
   Form Styles
   ============================================ */
.wb-form-group {
    margin-bottom: 20px;
}

.wb-form-label {
    display: block;
    font-weight: 600;
    color: var(--wb-text);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.wb-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--wb-border);
    border-radius: var(--wb-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--wb-transition);
    box-sizing: border-box;
    background: var(--wb-bg);
    color: var(--wb-text);
}

.wb-form-input:focus {
    outline: none;
    border-color: var(--wb-border-focus);
    box-shadow: 0 0 0 3px var(--wb-primary-light);
}

.wb-form-input::placeholder {
    color: var(--wb-text-muted);
}

/* Input Validierungs-States (v8.2.1-hotfix-13) */
.wb-form-input--valid {
    border-color: var(--wb-success);
    background: rgba(16, 185, 129, 0.05);
}

.wb-form-input--valid:focus {
    border-color: var(--wb-success);
    box-shadow: 0 0 0 3px var(--wb-success-light);
}

.wb-form-input--invalid {
    border-color: var(--wb-danger);
    background: rgba(239, 68, 68, 0.05);
}

.wb-form-input--invalid:focus {
    border-color: var(--wb-danger);
    box-shadow: 0 0 0 3px var(--wb-danger-light);
}

/* Form Row (nebeneinander) */
.wb-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.wb-form-group--half {
    flex: 1;
    margin-bottom: 0;
}

/* Input mit Buttons */
.wb-input-with-buttons {
    position: relative;
    display: flex;
    align-items: center;
}

.wb-input-with-buttons .wb-form-input {
    padding-right: 45px;
}

.wb-input-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--wb-text-light);
    transition: var(--wb-transition-fast);
}

.wb-input-btn:hover {
    color: var(--wb-primary);
}

/* Form Feedback */
.wb-form-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
}

.wb-form-feedback--success {
    color: var(--wb-success);
}

.wb-form-feedback--error {
    color: var(--wb-danger);
}

.wb-form-feedback--warning {
    color: var(--wb-warning);
}


/* ============================================
   Password Strength Indicator
   ============================================ */
.wb-password-strength {
    margin-bottom: 20px;
}

.wb-password-strength__bar {
    height: 8px;
    background: var(--wb-bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.wb-password-strength__fill {
    height: 100%;
    width: 0%;
    transition: var(--wb-transition);
    border-radius: 4px;
}

.wb-password-strength__text {
    font-size: 0.85rem;
    font-weight: 600;
}


/* ============================================
   Password Requirements (v8.2.1-hotfix-12: 2-spaltig)
   ============================================ */
.wb-password-requirements {
    background: var(--wb-info-light);
    border-left: 4px solid var(--wb-info);
    padding: 16px;
    border-radius: var(--wb-radius-sm);
    margin-bottom: 20px;
}

.wb-password-requirements__title {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e40af;
}

.wb-password-requirements__title i {
    margin-right: 6px;
}

.wb-password-requirements__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
}

.wb-password-requirements__item {
    font-size: 0.85rem;
    color: var(--wb-text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--wb-transition-fast);
}

.wb-password-requirements__item i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.wb-password-requirements__item--fulfilled {
    color: var(--wb-success);
}

.wb-password-requirements__item--fulfilled i {
    color: var(--wb-success);
}


/* ============================================
   Buttons (allgemein)
   ============================================ */
.wb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--wb-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wb-transition);
    font-family: inherit;
    text-decoration: none;
}

.wb-btn--sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.wb-btn--full {
    width: 100%;
}

.wb-btn--outline {
    background: transparent;
    border: 2px solid var(--wb-border);
    color: var(--wb-text);
}

.wb-btn--outline:hover {
    border-color: var(--wb-primary);
    color: var(--wb-primary);
    background: var(--wb-primary-light);
}

.wb-btn--primary {
    background: var(--wb-primary);
    color: white;
}

.wb-btn--primary:hover {
    background: var(--wb-primary-hover);
}


/* ============================================
   Social Login Buttons
   ============================================ */
.wb-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border: 2px solid var(--wb-border);
    border-radius: var(--wb-radius);
    background: var(--wb-bg);
    color: var(--wb-text);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--wb-transition);
    cursor: pointer;
}

.wb-social-btn:hover {
    border-color: var(--wb-text-light);
    background: var(--wb-bg-light);
}

.wb-social-btn img {
    width: 20px;
    height: 20px;
}

.wb-social-btn i {
    font-size: 20px;
}

.wb-social-btn--google:hover { border-color: #4285f4; }
.wb-social-btn--facebook i { color: #1877f2; }
.wb-social-btn--facebook:hover { border-color: #1877f2; }
.wb-social-btn--apple i { color: #000; }
.wb-social-btn--apple:hover { border-color: #000; }
.wb-social-btn--microsoft i { color: #00a4ef; }
.wb-social-btn--microsoft:hover { border-color: #00a4ef; }


/* ============================================
   Modal Divider & Links
   ============================================ */
.wb-modal__divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--wb-text-light);
    font-size: 0.9rem;
}

.wb-modal__divider::before,
.wb-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wb-border);
}

.wb-modal__divider span {
    padding: 0 16px;
}

.wb-modal__link-section {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--wb-text-light);
}

.wb-modal__link-section a {
    color: var(--wb-primary);
    text-decoration: none;
    font-weight: 500;
}

.wb-modal__link-section a:hover {
    text-decoration: underline;
}


/* ============================================
   Alert Boxes
   ============================================ */
.wb-alert {
    padding: 16px;
    border-radius: var(--wb-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wb-alert--success {
    background: var(--wb-success-light);
    border-left: 4px solid var(--wb-success);
    color: #065f46;
}

.wb-alert--warning {
    background: var(--wb-warning-light);
    border-left: 4px solid var(--wb-warning);
    color: #92400e;
}

.wb-alert--danger {
    background: var(--wb-danger-light);
    border-left: 4px solid var(--wb-danger);
    color: #991b1b;
}

.wb-alert--info {
    background: var(--wb-info-light);
    border-left: 4px solid var(--wb-info);
    color: #1e40af;
}

.wb-alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.wb-alert p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}


/* ============================================
   Status Modal Styles
   ============================================ */
.wb-status-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.wb-status-icon--success { color: var(--wb-success); }
.wb-status-icon--warning { color: var(--wb-warning); }
.wb-status-icon--danger { color: var(--wb-danger); }
.wb-status-icon--info { color: var(--wb-info); }
.wb-status-icon--primary { color: var(--wb-primary); }

.wb-status-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.wb-status-title--success { color: var(--wb-success); }

.wb-status-text {
    color: var(--wb-text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}


/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .wb-modal {
        padding: 10px;
    }
    
    .wb-modal__header {
        padding: 20px;
    }
    
    .wb-modal__title {
        font-size: 1.25rem;
    }
    
    .wb-modal__body {
        padding: 20px;
    }
    
    .wb-modal__footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .wb-modal__footer .wb-modal-btn {
        width: 100%;
    }
    
    /* Form Rows auf Mobile untereinander */
    .wb-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .wb-form-group--half {
        margin-bottom: 20px;
    }
    
    /* Geburtstag-Feld nicht breiter als E-Mail-Feld */
    #registerModal-birthdate {
        max-width: 100%;
    }
    
    /* Passwort-Anforderungen auf Mobile 1-spaltig */
    .wb-password-requirements__list {
        grid-template-columns: 1fr;
    }
}
