/* Eventia Pro -Frontend Player Styles (YouTube-Inspired) */

/* ==========================================================================
   Event Wrapper
   ========================================================================== */
.eventia-event-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==========================================================================
   Header Estilo YouTube
   ========================================================================== */
.eventia-event-header {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.eventia-event-header.eventia-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.eventia-event-header.eventia-header-relative {
    position: relative;
}

.eventia-header-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo e Título */
.eventia-header-logo img {
    max-height: 40px;
    max-width: 200px;
    height: auto;
    display: block;
}

.eventia-header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Navegação */
.eventia-header-nav {
    display: flex;
    align-items: center;
}

.eventia-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.eventia-nav-menu li {
    margin: 0;
}

.eventia-nav-menu a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.eventia-nav-menu a:hover {
    opacity: 0.7;
}

/* Mobile Menu Toggle */
.eventia-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 24px;
}

/* ==========================================================================
   Player Section
   ========================================================================== */
.eventia-player-section {
    width: 100%;
    background: #f9f9f9;
    padding-top: 60px;
    /* Espaço para header fixo */
}

.eventia-event-header.eventia-header-relative~.eventia-player-section {
    padding-top: 0;
}

.eventia-content-grid {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    padding: 24px;
}

/* ==========================================================================
   Player Wrapper
   ========================================================================== */
.eventia-player-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Player de Vídeo */
.eventia-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eventia-video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Status Indicators (LIVE / REC)
   ========================================================================== */
.eventia-status-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.eventia-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* LIVE Badge */
.eventia-live-badge {
    background: #ff0000;
    color: #fff;
    animation: livePulse 2s ease-in-out infinite;
}

.eventia-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulseOpacity 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 0, 0, 0);
    }
}

@keyframes pulseOpacity {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* REC Badge */
.eventia-rec-badge {
    background: #065fd4;
    color: #fff;
}

/* ==========================================================================
   Player Controls Bar (YouTube Style)
   ========================================================================== */
.eventia-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 12px 16px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.eventia-video-player:hover .eventia-player-controls {
    opacity: 1;
}

.eventia-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.eventia-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.eventia-control-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Fullscreen Mode */
.eventia-video-player.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    border-radius: 0;
    aspect-ratio: auto;
}

.eventia-video-player.fullscreen .eventia-player-controls {
    opacity: 0;
}

.eventia-video-player.fullscreen:hover .eventia-player-controls {
    opacity: 1;
}

.eventia-video-player.fullscreen .eventia-fullscreen-btn .dashicons-fullscreen-alt::before {
    content: "\f506";
    /* dashicons-fullscreen-exit-alt */
}

/* ==========================================================================
   Event Info
   ========================================================================== */
.eventia-event-info {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.eventia-event-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #030303;
}

.eventia-event-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #606060;
    font-size: 14px;
}

.eventia-event-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.eventia-viewers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eventia-separator {
    color: #d0d0d0;
}

/* ==========================================================================
   Chat Sidebar
   ========================================================================== */
.eventia-chat-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 140px);
    position: sticky;
    top: 84px;
}

.eventia-chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.eventia-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #030303;
}

/* Mensagens */
.eventia-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    min-height: 400px;
}

.eventia-chat-message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.eventia-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eventia-chat-message-content {
    flex: 1;
    min-width: 0;
}

.eventia-chat-message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.eventia-chat-message-author {
    font-weight: 600;
    font-size: 14px;
    color: #030303;
}

.eventia-chat-message-time {
    font-size: 12px;
    color: #606060;
}

.eventia-chat-message-text {
    font-size: 14px;
    line-height: 1.5;
    color: #030303;
    word-wrap: break-word;
}

/* Chat Form */
.eventia-chat-form {
    padding: 16px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 8px;
}

.eventia-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.eventia-chat-input:focus {
    border-color: #065fd4;
}

.eventia-chat-send {
    padding: 10px 16px;
    background: #065fd4;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eventia-chat-send:hover {
    background: #0450b4;
}

.eventia-chat-send .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Scrollbar personalizado */
.eventia-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.eventia-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.eventia-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.eventia-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==========================================================================
   Telas de Estado (Waiting, Ended, Error)
   ========================================================================== */
.eventia-waiting-screen,
.eventia-ended-screen,
.eventia-error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.eventia-error-screen {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.waiting-content,
.ended-content,
.error-content {
    padding: 40px;
}

.waiting-content .dashicons,
.ended-content .dashicons,
.error-content .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Mensagens de Acesso
   ========================================================================== */
.eventia-access-required,
.eventia-no-access {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 600px;
}

.eventia-access-required .button,
.eventia-no-access .button {
    display: inline-block;
    padding: 12px 32px;
    background: #065fd4;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.eventia-access-required .button:hover,
.eventia-no-access .button:hover {
    background: #0450b4;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1280px) {
    .eventia-content-grid {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 1024px) {
    .eventia-content-grid {
        grid-template-columns: 1fr;
    }

    .eventia-chat-sidebar {
        position: relative;
        top: 0;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .eventia-header-container {
        padding: 0 16px;
    }

    .eventia-mobile-menu-toggle {
        display: block;
    }

    .eventia-nav-menu {
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        background: inherit;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .eventia-nav-menu.active {
        display: flex;
    }

    .eventia-nav-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .eventia-nav-menu a {
        display: block;
        padding: 16px 24px;
    }

    .eventia-player-section {
        padding-top: 60px;
    }

    .eventia-content-grid {
        padding: 16px;
        gap: 16px;
    }

    .eventia-event-title {
        font-size: 18px;
    }

    .eventia-event-meta {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .eventia-chat-sidebar {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .eventia-event-header {
        height: 56px;
    }

    .eventia-header-logo img {
        max-height: 32px;
    }

    .eventia-content-grid {
        padding: 12px;
    }

    .eventia-video-player {
        border-radius: 8px;
    }

    .eventia-event-info {
        padding: 16px;
    }

    .eventia-status-indicator {
        top: 12px;
        left: 12px;
    }

    .eventia-status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    /* Mostrar controles sempre em mobile */
    .eventia-player-controls {
        opacity: 1;
    }

    .eventia-control-btn {
        padding: 8px;
    }

    .eventia-control-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

/* Touch devices - controles sempre visíveis */
@media (hover: none) and (pointer: coarse) {
    .eventia-player-controls {
        opacity: 1;
    }
}

/* ==========================================================================
   Animações
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.eventia-video-player iframe {
    animation: fadeIn 0.5s ease-in;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}