/* === MANAGES ALL NON-PIANO SHEET MUSIC INDEXES - ROW BASE === */
:root {
    --standard-offset: 65px; 
    --mobile-offset: 54px;
}

html {
    scroll-behavior: smooth;
}

.song-row {
    display: flex;
    align-items: center;
    height: 100px;
    min-height: 100px;
    position: relative;
    margin: 8px 0; 
    max-width: 1000px;
    width: 100%; 
    background: transparent;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 1;
}

.song-row.premium { background: #f5f5f7; }

.song-row:hover {
    height: 372px;
    margin-top: 16px;
    margin-bottom: 16px;
    z-index: 100;
    /* Added a slight delay for the expansion to feel more intentional */
    transition-delay: 1s; 
}

/* === THUMBNAIL COLUMN === */
.thumbnail-wrapper {
    flex: 0 0 auto; 
    padding: 10px;
    display: flex;
    align-items: center; 
    height: 100%;
}

.song-thumbnail {
    width: auto;
    height: 80px;
    display: block;
    object-fit: cover;
    transition: all 0.3s ease-in-out;
}

.song-row:hover .song-thumbnail {
    height: 332px;
    transition-delay: 1s;
}

/* === CONTENT === */
.song-content {
    display: flex;
    align-items: center;
    height: 100px !important; 
    gap: 30px; 
    flex: 1;
    padding-right: 40px;
    margin-left: 30px; 
    position: relative;
    z-index: 5;
}

/* === AUDIO DOT (CLICKABLE) === */
.audio-dot {
    width: 36px;
    height: 36px;
    background: #295788;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.audio-dot::before {
    content: "";
    width: 18px;
    height: 18px;
    background: url("/public/assets/images/play-button.png") center/contain no-repeat;
    transition: opacity .2s ease;
}

.audio-dot::after {
    content: "";
    width: 23px;
    height: 23px;
    position: absolute;
    background: url("/public/assets/images/play-button-waveform.png") center/contain no-repeat;
    opacity: 0;
    transition: opacity .2s ease;
}

.audio-dot.playing::before { opacity: 0; }
.audio-dot.playing::after { opacity: 1; }

/* === TITLE === */
.song-title {
    font-size: 18px;
    line-height: 1.4;
    color: #000 !important; /* Forces black text before expansion */
    text-decoration: none !important; /* Removes underlines */
    transition: color 0.3s ease;
}

/* Revealed blue link on hover/expand */
.song-row:hover .song-title { 
    color: #0071e3 !important; 
}

/* === PREMIUM BADGE (SIDEBAR) === */
.song-row.premium::before {
    content: "Premium";
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: #295788;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 10;
}

.text-silver-gray,
.text-silver-gray p,
.text-silver-gray span {
    color: #A9A9B2 !important;
    -webkit-text-fill-color: #A9A9B2 !important;
}

/* === JUMP NAVIGATION === */
.element-jump-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    justify-content: flex-start;
}

.element-btn {
    background-color: #295788;
    color: #ffffff !important;
    padding: 12px 5px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 1.0rem;
    text-align: center;
    flex: 0 0 calc(20% - 8px); 
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.element-btn:hover {
    background-color: #1a3a5c;
    color: #fff !important;
}

/* === CATEGORY HEADERS === */
.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.category-header h2 {
    margin: 0;
    line-height: 1.1;
    font-size: 1.75rem;
    color: #000;
}

.header-icon {
    width: 50px;
    height: auto;
    flex-shrink: 0;          
    margin-right: 15px;
    display: block;
}

/* === BADGES (POPULAR / ORIGINAL) === */
.popular-badge, 
.original-badge {
    display: inline-flex;    /* Forces height and centers text */
    align-items: center;
    justify-content: center;
    height: 28px;            /* Taller, consistent height */
    padding: 0 15px;         /* Better horizontal "pill" balance */
    border-radius: 14px;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1;          /* Prevents text from pushing the height */
}

.popular-badge {
    background: #295788;
    color: #fff;
}

.original-badge {
    background: #ff9f1c; 
    color: #fff;
}

/* === BACK TO TOP BUTTON === */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #295788 !important;
    color: #ffffff !important;
    border-radius: 50%;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 24px;
    z-index: 99999 !important; /* Max priority to float over expanded rows */
    box-shadow: none !important; /* Forces flat design */
    transition: background-color 0.2s ease;
    padding-bottom: 4px; /* Centers triangle symbol */
}

#backToTop:hover {
    background-color: #1a3a5c !important;
    /* Transform removed for flat design consistency */
}

/* === RESPONSIVE DESIGN === */

/* Tablet */
@media (max-width: 992px) {
    .element-btn {
        flex: 0 0 calc(33.33% - 8px);
    }
}

/* Mobile General */
@media (max-width: 767px) {
    .song-row, .song-row:hover {
        height: 60px !important;
        min-height: 60px !important;
        margin: 5px 0 !important; 
        width: 100% !important;
        transition: none !important;
    }
    
    .thumbnail-wrapper { display: none; }
    
    .song-content { 
        margin-left: 15px; 
        gap: 15px; 
        height: 60px !important; 
    }
    
    .song-title { font-size: 16px; }

    .song-row.premium::before {
        font-size: 8px; 
        letter-spacing: 1px;
    }
    
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Small Mobile Navigation & Headers */
@media (max-width: 576px) {
    .element-btn {
        flex: 0 0 calc(50% - 10px);
        font-size: 0.8rem;
        padding: 10px 2px;
    }

    .header-icon {
        width: 42px;
        margin-right: 12px;
    }

    .category-header h2 {
        font-size: 1.4rem;
    }
}