/**
 * YouTube Live Detector - Frontend Styles
 * Version 1.3.4
 */

.yld-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.yld-container.yld-loading {
    opacity: 0.6;
}

/* Player Wrapper */
.yld-player-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

/* Header Container (Título + Badge na mesma linha) */
.yld-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.yld-header-container .yld-live-title {
    margin: 0;
    flex-grow: 1;
}

.yld-header-container .yld-live-badge {
    margin: 0;
    flex-shrink: 0;
}

/* Badge "Ao Vivo" */
.yld-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
    animation: yld-pulse 2s infinite;
}

/* Badge como Overlay (Quando título não é acima) */
.yld-live-badge.yld-badge-overlay {
    margin-bottom: 12px;
}

.yld-live-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: yld-blink 1s infinite;
}

@keyframes yld-blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0.3;
    }
}

@keyframes yld-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Player Responsivo 16:9 */
.yld-player-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.yld-player-responsive.yld-rounded {
    border-radius: 12px;
}

.yld-player-responsive.yld-shadow-none {
    box-shadow: none;
}

.yld-player-responsive.yld-shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.yld-player-responsive.yld-shadow-medium {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.yld-player-responsive.yld-shadow-hard {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


.yld-player-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Título */
.yld-live-title {
    margin-top: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Classes de tamanho removidas pois agora é inline style (px) */

/* Fallback / Offline */
.yld-fallback-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.yld-fallback-image {
    width: 100%;
    height: auto;
    display: block;
}

.yld-fallback-image.yld-rounded {
    border-radius: 12px;
}

.yld-fallback-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
}

.yld-fallback-placeholder.yld-rounded {
    border-radius: 12px;
}

.yld-fallback-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
    fill: currentColor;
}

.yld-fallback-placeholder p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .yld-live-title {
        color: #f0f0f0;
    }
}

/* Countdown Styles */
.yld-countdown-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.yld-countdown-wrapper.yld-rounded {
    border-radius: 12px;
}

.yld-countdown-timer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.yld-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.yld-timer-separator {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-top: 5px;
    opacity: 0.8;
}

.yld-time {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}

.yld-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Responsividade básica para o contador */
@media (max-width: 600px) {
    .yld-time {
        font-size: 28px;
    }

    .yld-timer-separator {
        font-size: 24px;
        margin-top: 2px;
    }

    .yld-timer-unit {
        min-width: 45px;
    }
}