/**
 * ═══════════════════════════════════════════════════════════════════════════════
 * MUSICFLOW PWA - Mobile Fixes
 * ═══════════════════════════════════════════════════════════════════════════════
 * Fix-uri pentru buguri vizuale pe mobil
 */

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 0: Header Mobile - Iconuri pentru Auth
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Desktop: arată text, ascunde iconuri */
.header-auth-icon {
    display: none !important;
}

.header-mobile-search {
    display: none !important;
}

.header-auth-text {
    display: inline-flex !important;
}

/* Mobile: arată iconuri albe, ascunde text */
@media (max-width: 768px) {
    .header-auth-text {
        display: none !important;
    }
    
    /* Icon user pentru auth */
    .header-auth-icon {
        display: inline-flex !important;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        align-items: center;
        font-size: 1.35rem;
        color: white !important;
        background: transparent !important;
        border: none !important;
    }
    
    .header-auth-icon:hover,
    .header-auth-icon:focus {
        color: var(--primary) !important;
        background: rgba(255,255,255,0.1) !important;
        border-radius: 50%;
    }
    
    /* Icon search */
    .header-mobile-search {
        display: inline-flex !important;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        align-items: center;
        font-size: 1.35rem;
        color: white !important;
    }
    
    .header-mobile-search:hover {
        color: var(--primary) !important;
    }
    
    /* Ascunde bara de căutare din header pe mobil */
    .header-search {
        display: none !important;
    }
    
    /* Spațiere între iconuri */
    .header-actions {
        gap: 0.25rem;
    }
    
    /* Menu toggle - VIZIBIL pe mobil, alb */
    .menu-toggle {
        display: flex !important;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        color: white !important;
        background: transparent;
        border: none;
    }
    
    .menu-toggle:hover {
        color: var(--primary) !important;
    }
}

/* Extra small - și mai compact */
@media (max-width: 400px) {
    .header-auth-icon,
    .header-mobile-search,
    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 1: Homepage CTA Card - padding mai mic pe mobil
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .cta-card {
        padding: 2rem 1.5rem !important;
    }
    
    .cta-card h2 {
        font-size: 1.5rem !important;
    }
    
    .cta-card p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .cta-card .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 2: Song Page Header - text overflow pe mobil
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .song-hero {
        padding: calc(var(--header-height) + 1.5rem) 0 2rem;
        min-height: auto;
    }
    
    .song-title {
        font-size: 1.5rem !important;
        word-break: break-word;
        hyphens: auto;
    }
    
    .song-meta {
        font-size: 0.85rem;
    }
    
    .song-meta .separator {
        display: none;
    }
    
    .song-meta > * {
        margin-right: 0.5rem;
    }
    
    .song-meta > *:not(:last-child)::after {
        content: "•";
        margin-left: 0.5rem;
        opacity: 0.5;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 3: Song Actions - butoane pe un singur rând pe mobil
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .song-actions {
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
        justify-content: center;
        width: 100%;
    }
    
    /* Butonul principal Play - mai mic */
    .song-actions .btn-primary.btn-lg {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .song-actions .btn-primary.btn-lg i {
        margin-right: 0.25rem;
    }
    
    /* Butoanele icon - mai mici */
    .song-actions .btn-icon.btn-lg {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        font-size: 1.1rem;
    }
    
    /* Dropdown-ul cu 3 puncte */
    .song-actions .dropdown .btn-icon.btn-lg {
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 4: Song Details Card - design mai curat
 * ═══════════════════════════════════════════════════════════════════════════════ */
.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.details-list li:first-child {
    padding-top: 0.5rem;
}

.details-list li:last-child {
    border-bottom: none;
    padding-bottom: 0.5rem;
}

.details-list .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.details-list .value {
    font-weight: 500;
    color: var(--text-primary);
}

.details-list .value a {
    color: var(--primary);
}

/* Card padding consistent */
.card-header h4,
.card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

@media (max-width: 576px) {
    .details-list li {
        padding: 0.875rem 0;
    }
    
    .details-list .label,
    .details-list .value {
        font-size: 0.875rem;
    }
    
    /* Card-uri cu padding mai bun pe mobil */
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 5: General Mobile Improvements
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Section spacing */
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    /* Buttons în general */
    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* py-5 mai mic pe mobil */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIX 6: Music Cards Grid pe mobil
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .music-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .music-card-title {
        font-size: 0.85rem;
    }
    
    .music-card-subtitle {
        font-size: 0.75rem;
    }
}
