/* ========================================
   Auto Webinar System — Frontend Styles
   ======================================== */

.webinar-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.webinar-player-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 default */
    overflow: hidden;
}

.webinar-video-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Zoom-crop: scale iframe ~8% larger so YouTube UI at edges is clipped */
.webinar-video-target iframe {
    position: absolute;
    top: -4.5%;
    left: -4.5%;
    width: 109%;
    height: 109%;
    border: 0;
}

/* Hidden until YouTube confirms PLAYING state — prevents flash of YT branding */
.webinar-video-hidden,
.webinar-video-hidden iframe {
    opacity: 0 !important;
    pointer-events: none;
}

/* Click shield — blocks YouTube interaction */
.webinar-click-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: default;
}

/* Overlay — waiting/starting/ended states */
.webinar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: rgba(0, 0, 0, 1.0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.webinar-overlay-visible {
    opacity: 1;
    pointer-events: auto;
}

.webinar-overlay-content {
    text-align: center;
    color: #fff;
    padding: 40px 20px;
}

.webinar-overlay-message {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.4;
}

.webinar-countdown {
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    color: #ff6b35;
}

/* Spinner */
.webinar-spinner {
    display: none;
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: webinar-spin 0.8s linear infinite;
}

@keyframes webinar-spin {
    to { transform: rotate(360deg); }
}

/* Live indicator */
.webinar-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #e53e3e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 1px;
}

.webinar-live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: webinar-pulse 1.5s ease-in-out infinite;
}

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

/* CTA Container */
.webinar-cta-container {
    text-align: center;
    padding: 30px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.webinar-cta-container.webinar-cta-visible {
    opacity: 1;
    transform: translateY(0);
}

.webinar-cta-button {
    display: inline-block;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #e53e3e);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: webinar-cta-glow 2s ease-in-out infinite;
}

.webinar-cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(229, 62, 62, 0.4);
    color: #fff;
    text-decoration: none;
}

@keyframes webinar-cta-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(229, 62, 62, 0.6); }
}

/* Responsive */
@media (max-width: 768px) {
    .webinar-overlay-message {
        font-size: 16px;
    }
    .webinar-countdown {
        font-size: 28px;
    }
    .webinar-cta-button {
        padding: 14px 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .webinar-overlay-message {
        font-size: 14px;
    }
    .webinar-countdown {
        font-size: 22px;
    }
    .webinar-cta-button {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
    }
}
