/* 
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TENSHO MUSIC — REUSABLE UI COMPONENTS (assets/css/components.css)
   Angel Carmona / Tensho Beats
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/

/* ─── Beat Cards Grid & Lists ─────────────────────────────────────────── */
.beats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.beat-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.beat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--primary-raw), 0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 20px var(--primary-glow);
}

.beat-cover-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #000;
}

.beat-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.beat-card:hover .beat-cover {
    transform: scale(1.08);
}

.beat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition-smooth);
    z-index: 2;
}

.beat-card:hover .beat-overlay {
    opacity: 1;
}

/* Audio Play Button Premium */
.play-btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition-smooth);
}

.play-btn-circle:hover {
    transform: scale(1.1);
    background: #fff;
    color: var(--primary);
}

.play-btn-circle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    margin-left: 4px; /* offset for play icon */
}

/* Beat Details */
.beat-info {
    padding: 1.5rem;
    background: var(--surface);
}

.beat-title {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.beat-producer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.beat-meta-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    border: 1px solid var(--border-color);
}

.beat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.beat-price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.price-value {
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--gold);
}

.beat-actions-right {
    display: flex;
    gap: 0.75rem;
}

.like-btn, .fav-btn {
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.like-btn:hover, .like-btn.liked {
    color: var(--accent);
}

.fav-btn:hover, .fav-btn.favorited {
    color: var(--gold);
}

/* Beat Badges */
.badge-free {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(var(--accent-raw), 0.3);
}

.badge-exclusive {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold);
    color: #000;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    z-index: 5;
}

/* ─── Beat List View ───────────────────────────────────────────────────── */
.beats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 2rem 0;
}

.beat-list-row {
    display: grid;
    grid-template-columns: 80px 50px 2fr 1fr 1fr 1fr 120px 180px;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(var(--surface-raw), 0.4);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.beat-list-row:hover {
    background: var(--surface);
    border-color: rgba(var(--primary-raw), 0.2);
}

.beat-list-cover {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.beat-list-row .play-btn-circle {
    width: 36px;
    height: 36px;
}

.beat-list-row .play-btn-circle svg {
    width: 14px;
    height: 14px;
    margin-left: 2px;
}

.beat-list-specs {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ─── Premium Modals (Glassmorphism) ──────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.08);
}

.modal-backdrop.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-close {
    font-size: 1.5rem;
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    opacity: 1;
    color: var(--accent);
}

/* ─── Auth Forms (Glass card) ────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 15px rgba(var(--primary-raw), 0.15);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-checkbox input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ─── Dashboards & Panels ────────────────────────────────────────────── */
.dash-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dash-menu-item:hover, .dash-menu-item.active {
    background: var(--surface-light);
    color: var(--text-primary);
}

.dash-menu-item.active {
    border-left: 4px solid var(--primary);
    background: rgba(var(--primary-raw), 0.05);
}

.dash-content {
    background: rgba(var(--surface-raw), 0.5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
}

/* responsive components */
@media (max-width: 1200px) {
    .beat-list-row {
        grid-template-columns: 80px 50px 2fr 1fr 1fr 120px;
        gap: 1rem;
    }
    .beat-list-row .beat-list-specs:nth-child(4), 
    .beat-list-row .beat-list-specs:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .dash-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .beat-list-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
    }
    .beat-list-row .play-btn-circle {
        display: flex !important;
        order: 1; /* Play button at the top */
    }
    .beat-list-row .beat-list-cover {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto !important;
        order: 2;
    }
    .beat-list-row div:has(a) {
        order: 3; /* Title */
    }
    .beat-list-row .beat-list-specs {
        display: inline-block !important;
        font-size: 0.85rem !important;
        color: var(--text-secondary) !important;
        margin: 0 0.5rem !important;
        order: 4;
    }
    .beat-list-row div[style*="justify-content: flex-end"] {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        margin-left: 0 !important;
        order: 5; /* Actions at the bottom */
        gap: 1rem !important;
    }
    .beat-list-row div[style*="justify-content: flex-end"] .btn {
        flex: 1 !important;
        justify-content: center !important;
    }
}

/* ─── Floating WhatsApp Button ────────────────────────────────────────── */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    text-decoration: none;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.floating-whatsapp svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .floating-whatsapp {
        /* Float above the iOS bottom tab bar (≈80px) */
        bottom: 90px;
        right: 18px;
        width: 52px;
        height: 52px;
    }
    .floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }
}
