/* Digital Signage App - Full-screen slideshow display */
/* Designed for lobby TVs, hallway monitors, public screens */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: none;
}

/* ============================================
   SLIDESHOW
   Two-layer crossfade: slideA and slideB
   alternate visibility for smooth transitions
   ============================================ */

.slideshow {
    position: fixed;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Transition variants (applied via JS) */
.slideshow.transition-none .slide {
    transition: none;
}

.slideshow.transition-slide .slide {
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
    transform: translateX(100%);
}

.slideshow.transition-slide .slide.active {
    transform: translateX(0);
}

.slideshow.transition-slide .slide.exiting {
    transform: translateX(-100%);
    opacity: 0;
}

/* ============================================
   FALLBACK / PLACEHOLDER
   Shown when no slides are configured
   ============================================ */

.fallback {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    transition: opacity 0.6s ease-out;
}

.fallback.hidden {
    opacity: 0;
    pointer-events: none;
}

.fallback-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.fallback-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
}

.fallback-text {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.fallback-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* ============================================
   GROUP BRANDING (TLP-1021)
   Only ever active when a display resolves to a group that supplies one.
   An ungrouped display never gets `.branded` and renders exactly as before.
   ============================================ */

.branded {
    background: var(--brand-bg);
}

.branded .slide {
    background-size: contain;
    background-color: var(--brand-bg);
}

.branded .fallback {
    background: var(--brand-bg);
}

.branded .fallback-content {
    color: var(--brand-ink);
}

.branded .fallback-logo {
    background: transparent;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.branded .fallback-text {
    color: var(--brand-ink);
}

.branded .fallback-sub {
    color: var(--brand-accent);
}

.typeface-serif { font-family: Georgia, 'Times New Roman', serif; }
.typeface-display { font-family: 'Trebuchet MS', 'Gill Sans', Verdana, sans-serif; }

/* Corner mark. Sits above the slides, out of the way of the image centre. */
.brand-logo {
    position: fixed;
    right: 3vmin;
    bottom: 3vmin;
    z-index: 3;
    max-width: 18vmin;
    max-height: 10vmin;
    object-fit: contain;
    opacity: 0.9;
}

.brand-logo.hidden {
    display: none;
}
