/**
 * Chatbot Layout - Fullscreen Mode
 *
 * Verantwortlichkeit: Fullscreen Modal Layout (exakt wie suma-center)
 * Styling: CockpitOS Light CSS-Variablen
 *
 * @package CockpitOS_Light_Theme
 * @version 1.0.0
 */

/* ========================================
   Fullscreen Modal
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--chatbot-z-index-modal);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"].cockpit-os-chatbot-modal--open {
    display: block;
    animation: chatbotFadeIn 0.3s ease forwards;
}

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

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

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right,
        var(--color-white) 0%,
        var(--color-gray-50) 50%,
        rgba(243, 244, 246, 0.95) 100%
    );
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================
   Header - Fixed Top mit Glassmorphism (exakt wie suma-center)
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    animation: slideInFromTop 0.4s ease-out 0.1s backwards;
}

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

/* ========================================
   Header Title (zentriert wie suma-center)
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 600px;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__title h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0;
    line-height: 1.2;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__title p {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-gray-500);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

/* ========================================
   Close Button (links oben wie suma-center)
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__close {
    position: fixed;
    top: 14px;
    left: 16px;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 51;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__close:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primary);
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__close svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========================================
   Messages Container (exakt wie suma-center)
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 80px 16px 144px 16px;
    background: transparent;
    animation: slideInFromBottom 0.6s ease-out 0.4s backwards;
    scroll-behavior: smooth;
}

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

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body-inner {
    max-width: 1536px;
    margin: 0 auto;
    width: 100%;
}

/* Custom Scrollbar */
.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body::-webkit-scrollbar {
    width: 8px;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body::-webkit-scrollbar-track {
    background: transparent;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   Footer - Fixed Bottom mit Glassmorphism (exakt wie suma-center)
   ======================================== */

.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(229, 231, 235, 1);
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* iOS Safari */
@supports (-webkit-touch-callout: none) {
    .cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__footer {
        bottom: env(safe-area-inset-bottom, 0);
    }
}

/* Footer Inner Container - Max Width für Fullscreen */
.cockpit-os-chatbot-modal[data-layout="fullscreen"] .cockpit-os-chatbot-modal__input {
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
}