/* Modal Styles */

.playlist-modal.active {
    display: flex !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.3) !important;
    font-weight: 700;
}

.repo-item.selected {
    background: rgba(76, 175, 80, 0.5) !important;
    border: 2px solid #4CAF50 !important;
}

/* Status Messages */
.status-message {
    display: none;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    text-align: center;
}

.status-message.success {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid #4CAF50;
    display: block;
}

.status-message.error {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid #f44336;
    display: block;
}

.status-message.info {
    background: rgba(33, 150, 243, 0.3);
    border: 1px solid #2196F3;
    display: block;
}

/* Scrollbars */
.playlist-content::-webkit-scrollbar,
.repo-list::-webkit-scrollbar {
    width: 8px;
}

.playlist-content::-webkit-scrollbar-track,
.repo-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.playlist-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.playlist-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.repo-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.repo-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Modal Responsive Styles */
@media (max-width: 768px) {
    .playlist-content {
        padding: 1.5rem;
        max-h-[85vh];
    }
    
    .playlist-header h2 {
        font-size: 1.5rem;
    }
    
    /* Tabs en móvil - 4 pestañas en scroll horizontal */
    .tabs-container {
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
        position: relative;
    }
    
    /* Indicador de scroll - gradiente a la derecha */
    .tabs-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, rgba(17, 24, 39, 0.8));
        pointer-events: none;
        border-radius: 0 0.75rem 0 0;
    }
    
    .tabs-container::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 0.65rem 0.75rem;
        min-width: 100px;
        flex-shrink: 0;
    }
    
    /* Reducir padding de inputs en móvil */
    input[type="url"],
    input[type="text"],
    input[type="password"],
    select,
    textarea {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Botones de carga más compactos */
    .load-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* Small Mobile (iPhone SE, etc) */
@media (max-width: 375px) {
    .playlist-content {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .playlist-header h2 {
        font-size: 1.25rem;
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.65rem;
        min-width: 85px;
    }
    
    /* Grid de 2 columnas para usuario/contraseña en Xtream */
    .input-group.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
