/* 3flows.nl — Donna AI Experience Styles */

/* === L3 — VIDEO CANVAS === */
#video-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1;
    background: #101828;
}

/* === L2 — GLASS PANEL === */
#glass-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: calc(8vh + env(safe-area-inset-bottom, 0px));
    /* Glass state set by JS — starts clear */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: rgba(16, 24, 40, 0);
    transition: none; /* GSAP handles transitions */
}

#glass-panel.content-mode {
    pointer-events: none;
}

#glass-panel.conversation-active {
    z-index: 50;
}

/* === MENU BAR === */
#menu-bar {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
}

.menu-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px 14px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #101828;
    padding: 8px 16px;
    position: relative;
    outline: none;
    transition: color 0.35s ease;
}

.menu-item:hover {
    color: #1CDBF1;
}

.menu-item:hover .menu-indicator {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.menu-item:active {
    transform: scale(0.95);
}

.menu-indicator {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 72px;
    height: 2px;
    border-radius: 0;
    background: #1CDBF1;
    box-shadow: 0 0 8px rgba(28, 219, 241, 0.6), 0 0 16px rgba(28, 219, 241, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-item.active {
    color: #1CDBF1;
}

.menu-item.active .menu-indicator {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.menu-item span {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Bottom website button */
.menu-bottom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid rgba(16, 24, 40, 0.08);
    color: #101828;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: color 0.35s ease;
}

.menu-bottom-btn span {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.menu-bottom-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.menu-bottom-btn:hover {
    color: #1CDBF1;
}

.menu-bottom-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 60px);
    height: 2px;
    border-radius: 0;
    background: #1CDBF1;
    box-shadow: 0 0 8px rgba(28, 219, 241, 0.6), 0 0 16px rgba(28, 219, 241, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-bottom-btn:hover .menu-bottom-indicator {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

/* Phone drawer */
.phone-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.phone-drawer.open {
    max-height: 80px;
}

.phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    color: #101828;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.35s ease;
}

.phone-link:hover {
    color: #1CDBF1;
}

.phone-link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* WhatsApp drawer */
.whatsapp-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.whatsapp-drawer.open {
    max-height: 80px;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    color: #101828;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.35s ease;
}

.whatsapp-link:hover {
    color: #1CDBF1;
}

.whatsapp-link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* === CLOSE BUTTON === */
.btn-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease;
    z-index: 50;
}

.btn-close:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

/* === CONVERSATION UI (shared) === */
.conv-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.conv-ui.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* === VOICE UI === */
.voice-orb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

#voice-orb-canvas {
    width: min(35vh, 400px);
    height: min(35vh, 400px);
}

.voice-status {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Transcript (voice mode) */
.transcript {
    width: 100%;
    max-width: 500px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 219, 241, 0.2) transparent;
}

.transcript::-webkit-scrollbar {
    width: 4px;
}

.transcript::-webkit-scrollbar-thumb {
    background: rgba(28, 219, 241, 0.2);
    border-radius: 2px;
}

.transcript-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: bubble-in 0.3s ease-out;
}

.transcript-msg.agent {
    align-self: flex-start;
    background: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #101828;
}

.transcript-msg.user {
    align-self: flex-end;
    background: rgba(16, 24, 40, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

/* === CHAT UI === */
.chat-messages {
    flex: 1;
    width: 100%;
    max-width: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 80px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 219, 241, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(28, 219, 241, 0.2);
    border-radius: 2px;
}

.chat-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: bubble-in 0.3s ease-out;
}

.chat-bubble.agent {
    align-self: flex-start;
    background: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #101828;
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(16, 24, 40, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

/* Chat input */
.chat-input-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    gap: 8px;
    padding: 16px 0;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(14, 53, 58, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(28, 219, 241, 0.15);
    border-radius: 8px;
    color: #FFFFFF;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-input:focus {
    border-color: rgba(28, 219, 241, 0.4);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #1CDBF1;
    border: none;
    border-radius: 8px;
    color: #101828;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

/* === L1 — PRELOADER === */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    background: #101828;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Preloader background image — visible from first paint */
#preloader::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: url('../assets/preloader-bg.png') center/cover no-repeat;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.preloader-logo-img {
    width: 90px;
    height: auto;
    margin-bottom: 24px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.preloader-bar {
    width: 90px;
    height: 2px;
    background: #0E353A;
    border-radius: 1px;
    overflow: visible;
    margin: 0 auto 16px;
}

.preloader-fill {
    width: 0%;
    height: 100%;
    background: #1CDBF1;
    border-radius: 1px;
    transition: width 0.3s ease;
    box-shadow: 0 0 6px rgba(28, 219, 241, 0.6), 0 0 14px rgba(28, 219, 241, 0.3);
}

.preloader-text {
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    #voice-orb-canvas {
        width: min(30vh, 280px);
        height: min(30vh, 280px);
    }

    .chat-bubble {
        max-width: 90%;
        font-size: 0.85rem;
    }

    .btn-close {
        top: 16px;
        right: 16px;
    }

    .menu-item {
        padding: 4px 12px;
    }

    .menu-icon {
        width: 22px;
        height: 22px;
    }
}
