/**
 * SISFILA PRO+ - Panel CSS v4.0
 * Estilos para o painel eletrônico com WebSocket
 */

:root {
    --primary-color: #3B82F6;
    --secondary-color: #8B5CF6;
    --success-color: #10B981;
    --background-start: #1e3a8a;
    --background-end: #1e40af;
    --text-color: #fff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--background-start) 0%, var(--background-end) 100%);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

.panel-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* ======================================== HEADER ======================================== */

.panel-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2vh 3vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--glass-border);
    flex-shrink: 0;
}

.panel-logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
}

.panel-clock {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #EF4444;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ======================================== MAIN CONTENT ======================================== */

.panel-main {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
    overflow: hidden;
}

/* ======================================== CHAMADA ATUAL ======================================== */

.current-call {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.current-call.pulse {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.call-label {
    font-size: clamp(1.2rem, 2vw, 2rem);
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2vh;
}

.call-ticket {
    font-size: clamp(6rem, 15vw, 14rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2vh;
}

.call-name {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 2vh;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.call-counter {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: #6B7280;
}

.call-counter strong {
    display: block;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 1vh;
}

/* ======================================== CHAMADAS RECENTES ======================================== */

.recent-calls {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 2rem;
    padding: 1.5rem;
    border: 2px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recent-calls h3 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
}

.recent-item {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
}

.recent-ticket {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
}

.recent-arrow {
    font-size: 2rem;
    opacity: 0.5;
}

.recent-counter {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

/* ======================================== FOOTER ======================================== */

.panel-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5vh 0;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-ticker {
    overflow: hidden;
}

.ticker-content {
    display: flex;
    gap: 3rem;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-content span {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 600;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ======================================== RESPONSIVO ======================================== */

/* Smart TV / Large Screens */
@media (min-width: 1920px) {
    .panel-main {
        gap: 3rem;
        padding: 3rem;
    }
}

/* Tablets & Small Laptops */
@media (max-width: 1200px) {
    .panel-main {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* Mobile & Portrait Tablets */
@media (max-width: 900px) {
    .panel-main {
        grid-template-columns: 1fr;
        grid-template-rows: 1.5fr 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .recent-calls {
        flex-direction: column;
    }

    .recent-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
    }

    .recent-item {
        min-width: 200px;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .recent-arrow {
        transform: rotate(90deg);
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .panel-logo svg {
        width: 32px;
        height: 32px;
    }

    .panel-main {
        grid-template-rows: 2fr 1fr;
    }

    .current-call {
        padding: 1rem;
    }

    .recent-item {
        min-width: 150px;
        padding: 0.5rem;
    }

    .recent-ticket {
        font-size: 1.5rem;
    }

    .recent-counter {
        font-size: 1rem;
    }
}