/**
 * Chatbot Centerplan Modal
 *
 * Modal für Centerplan-Anzeige aus Chatbot
 * Fullscreen Modal mit Centerplan Widget
 *
 * @package SMG_Mall
 * @since 2.1.0
 */

/* ========================================
   Modal Base
   ======================================== */

.centerplan-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.centerplan-modal--open {
    display: flex;
}

/* ========================================
   Overlay
   ======================================== */

.centerplan-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Container
   ======================================== */

.centerplan-modal__container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

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

/* ========================================
   Header
   ======================================== */

.centerplan-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.centerplan-modal__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0;
}

.centerplan-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-gray-600);
}

.centerplan-modal__close:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
    transform: scale(1.05);
}

/* ========================================
   Content
   ======================================== */

.centerplan-modal__content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.centerplan-modal__loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-gray-600);
}

.centerplan-modal__loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(227, 30, 36, 0.2);
    border-top-color: var(--color-primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-4);
}

.centerplan-modal__centerplan {
    width: 100%;
    height: 100%;
    display: none;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .centerplan-modal {
        padding: 0;
    }

    .centerplan-modal__container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .centerplan-modal__header {
        padding: var(--space-4);
    }

    .centerplan-modal__title {
        font-size: var(--text-xl);
    }
}

