/**
 * Pride TV Chromecast Styles
 * Estilos para la integración de Chromecast
 */

/* Cast button container */
.cast-button-container {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1000;
    width: 24px;
    height: 24px;
}

/* Google Cast Launcher button styling */
google-cast-launcher {
    --connected-color: #8B5CF6;
    --disconnected-color: rgba(255, 255, 255, 0.8);
    --focus-color: #A78BFA;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 24px; /* Ajustar el ancho */
    height: 24px; /* Ajustar la altura */
}

google-cast-launcher:hover {
    --disconnected-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

google-cast-launcher:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Casting indicator animations */
.casting-indicator {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Cast button tooltip */
.cast-button-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.cast-button-container:hover::after {
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .cast-button-container {
        top: 5px;
        right: 5px;
    }
    
    google-cast-launcher {
        --disconnected-color: rgba(255, 255, 255, 0.9);
    }
}

/* Error and notification styles */
.cast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInFromTop 0.3s ease-out;
}

.cast-notification.success {
    background: #8B5CF6;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.cast-notification.error {
    background: #EF4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cast-notification.info {
    background: #6B7280;
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Cast icon in notifications */
.cast-notification svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Loading spinner for cast connection */
.cast-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Hide cast button when not supported */
.no-cast-support .cast-button-container {
    display: none;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    google-cast-launcher,
    .casting-indicator,
    .cast-notification {
        animation: none;
        transition: none;
    }
    
    google-cast-launcher:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    google-cast-launcher {
        --disconnected-color: white;
        --connected-color: #FFFFFF;
    }
    
    .cast-notification {
        border: 2px solid white;
    }
}

