/* Kiosk — Fullscreen Presentation Viewer */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    cursor: none;
    user-select: none;
    -webkit-user-select: none;
    /* Prevent all touch interactions */
    touch-action: none;
    -webkit-touch-callout: none;
}

#kiosk-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    /* Block all pointer events on container children */
    pointer-events: none;
}

/* Current slide image */
#current-slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    transition: opacity 150ms ease;
}

#current-slide.loading {
    opacity: 0;
}

#current-slide.visible {
    opacity: 1;
}

/* Hidden preload images */
.preload-img {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* Waiting screen */
#waiting-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index: 10;
    transition: opacity 400ms ease;
}

#waiting-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.waiting-icon {
    font-size: 72px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.waiting-text {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.waiting-sub {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 16px;
    color: #64748b;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Connection status dot */
.status-dot {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 100;
    transition: opacity 1s ease;
    pointer-events: none;
}

.status-dot.connected {
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
}

.status-dot.disconnected {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
    animation: pulse-status 1.5s infinite;
}

.status-dot.fade {
    opacity: 0;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;600&display=swap');
