/**
 * Flaig Customer Type Selector Modal Styles
 * Responsive, modern design mit Flaig-Farben
 */

/* ========================================
   MODAL OVERLAY
   ======================================== */

.flaig-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 42, 94, 0.85); /* Primary Blue mit Transparenz */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Sehr hoch, damit über Cookie-Banner */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.flaig-modal-overlay.flaig-modal-active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MODAL CONTAINER
   ======================================== */

.flaig-modal-container {
    max-width: 600px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.flaig-modal-overlay.flaig-modal-active .flaig-modal-container {
    transform: translateY(0);
}

/* ========================================
   MODAL CONTENT
   ======================================== */

.flaig-modal-content {
    padding: 40px 30px;
    text-align: center;
}

/* Logo */
.flaig-modal-logo {
    margin-bottom: 30px;
}

.flaig-modal-logo img {
    max-width: 200px;
    height: auto;
    width: 100%;
}

/* Texte */
.flaig-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0E2A5E; /* Primary Blue */
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.flaig-modal-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0E2A5E;
    margin: 0 0 20px 0;
}

.flaig-modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #0E2A5E;
    margin: 0 0 35px 0;
}

/* ========================================
   BUTTONS
   ======================================== */

.flaig-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.flaig-customer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border: 3px solid #0E2A5E;
    background: #0E2A5E;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    height: 90px;
    position: relative;
    overflow: hidden;
}

.flaig-customer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.flaig-customer-btn:hover::before {
    left: 100%;
}

.flaig-customer-btn:hover {
    background: #0E2A5E;
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 42, 94, 0.3);
}

.flaig-customer-btn:active {
    transform: translateY(-1px);
}

/* B2C Button (Privatkunde) */
.flaig-customer-btn-b2c:hover {
    background: #0E2A5E;
    border-color: #0E2A5E;
}

/* B2B Button (Geschäftskunde) */
.flaig-customer-btn-b2b:hover {
    background: #FF2400; /* Accent Red */
    border-color: #FF2400;
}

/* Button Inhalt */
.flaig-btn-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.flaig-btn-title {
    font-size: 1.125rem;
    font-weight: 400;
    display: block;
    margin-bottom: 5px;
    color: white;
    transition: color 0.3s ease;
}

.flaig-customer-btn:hover .flaig-btn-title {
    color: #FFFFFF;
}

.flaig-btn-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: white;
    display: block;
    transition: color 0.3s ease;
}

.flaig-customer-btn:hover .flaig-btn-subtitle {
    color: #FFFFFF;
}

/* ========================================
   FOOTER & NOTICE
   ======================================== */

.flaig-modal-footer {
    margin-top: 20px;
}

.flaig-modal-notice {
    margin: 0;
    color: #888;
    font-size: 0.8125rem;
}

.flaig-modal-notice small {
    font-size: inherit;
}

/* ========================================
   LOADER
   ======================================== */

.flaig-modal-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.flaig-modal-loader p {
    margin: 0;
    color: #0E2A5E;
    font-weight: 600;
}

.flaig-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0E2A5E;
    border-radius: 50%;
    animation: flaig-spin 1s linear infinite;
}

@keyframes flaig-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet Portrait: 445px - 833px */
@media screen and (min-width: 445px) and (max-width: 833px) {
    .flaig-modal-content {
        padding: 35px 25px;
    }

    .flaig-modal-title {
        font-size: 1.5rem;
    }

    .flaig-modal-subtitle {
        font-size: 1.125rem;
    }

    .flaig-modal-description {
        font-size: 0.9375rem;
    }

    .flaig-modal-logo img {
        max-width: 180px;
    }
}

/* Mobile: 300px - 444px */
@media screen and (max-width: 444px) {
    .flaig-modal-overlay {
        padding: 15px;
    }

    .flaig-modal-content {
        padding: 30px 20px;
    }

    .flaig-modal-title {
        font-size: 1.375rem;
        margin-bottom: 12px;
    }

    .flaig-modal-subtitle {
        font-size: 1.0625rem;
        margin-bottom: 15px;
    }

    .flaig-modal-description {
        font-size: 0.875rem;
        margin-bottom: 25px;
    }

    .flaig-modal-logo {
        margin-bottom: 20px;
    }

    .flaig-modal-logo img {
        max-width: 150px;
    }

    .flaig-customer-btn {
        padding: 20px 15px;
    }

    .flaig-btn-icon {
        font-size: 2.1875rem;
        margin-bottom: 8px;
    }

    .flaig-btn-title {
        font-size: 1rem;
    }

    .flaig-btn-subtitle {
        font-size: 0.8125rem;
    }

    .flaig-modal-buttons {
        gap: 12px;
        margin-bottom: 20px;
    }
}

/* Laptop und größer: 1112px+ */
@media screen and (min-width: 1112px) {
    .flaig-modal-buttons {
        flex-direction: row;
        gap: 20px;
    }

    .flaig-customer-btn {
        flex: 1;
        min-height: 90px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.flaig-customer-btn:focus {
    outline: 3px solid #FF2400;
    outline-offset: 3px;
}

/* Reduzierte Bewegung für Nutzer mit Präferenz */
@media (prefers-reduced-motion: reduce) {
    .flaig-modal-overlay,
    .flaig-modal-container,
    .flaig-customer-btn,
    .flaig-customer-btn::before {
        transition: none;
    }

    .flaig-spinner {
        animation: none;
        border-top-color: #0E2A5E;
    }
}

/* ========================================
   TRIGGER BUTTON (für Footer)
   ======================================== */

.flaig-customer-type-trigger {
    display: inline-block;
    padding: 10px 20px;
    background: #0E2A5E;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.flaig-customer-type-trigger:hover {
    background: #FF2400;
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-2px);
}

.flaig-customer-type-trigger:active {
    transform: translateY(0);
}
