/* WP WebTV & WebRadio - TV Player Styles */

.jewebtv-tv-container {
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.jewebtv-tv-player-wrap {
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.jewebtv-tv-video {
    object-fit: contain;
}

/* Loading spinner */
.jewebtv-tv-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.jewebtv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jewebtv-spin 0.8s linear infinite;
}

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

/* Error */
.jewebtv-tv-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    text-align: center;
    z-index: 3;
}

.jewebtv-tv-error p {
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
}

/* Now Playing bar */
.jewebtv-tv-now-playing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 13px;
    border-radius: 0 0 8px 8px;
}

.jewebtv-now-playing-label {
    font-weight: 600;
    color: #8ab4f8;
    white-space: nowrap;
}

.jewebtv-now-playing-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* CTA Overlay */
.jewebtv-tv-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.jewebtv-tv-overlay.jewebtv-overlay-visible {
    opacity: 1;
}

.jewebtv-overlay-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.jewebtv-overlay-cta:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.jewebtv-overlay-qr {
    display: none;
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
    flex-shrink: 0;
}

.jewebtv-overlay-qr svg {
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) {
    .jewebtv-overlay-qr {
        display: block;
    }
}

.jewebtv-overlay-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jewebtv-overlay-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.jewebtv-overlay-tap {
    display: block;
    font-size: 10px;
    color: rgba(255, 165, 0, 0.8);
    margin-top: 2px;
}

@media (min-width: 768px) {
    .jewebtv-overlay-tap {
        display: none;
    }
}

.jewebtv-overlay-dismiss {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #333;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0;
}

.jewebtv-overlay-cta:hover .jewebtv-overlay-dismiss {
    opacity: 1;
}

.jewebtv-overlay-dismiss:hover {
    color: #fff;
}

/* General error text */
.jewebtv-error {
    color: #dc3232;
    font-style: italic;
}
