/* LyricsSangrah — Context Engine — Frontend CSS */

.lsce-wrap * { box-sizing: border-box; }

/* ════════════════════════════════════════
   LOADING STATE
════════════════════════════════════════ */
.lsce-loading {
    padding: 32px 20px;
    text-align: center;
}
.lsce-loading-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #F5F0E8;
    border: 1px solid #E2D5BC;
    border-radius: 30px;
    padding: 12px 22px;
    font-size: 13px;
    color: #5A4020;
}
.lsce-loading-icon { font-size: 18px; animation: lsce-spin 2s linear infinite; display:inline-block }
@keyframes lsce-spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.lsce-loading-dots span {
    animation: lsce-blink 1.4s infinite;
    opacity: 0;
}
.lsce-loading-dots span:nth-child(2) { animation-delay:.2s }
.lsce-loading-dots span:nth-child(3) { animation-delay:.4s }
@keyframes lsce-blink { 0%,80%,100%{opacity:0} 40%{opacity:1} }

/* ════════════════════════════════════════
   CONTEXT BAR
════════════════════════════════════════ */
.lsce-context-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: #F5F0E8;
    border: 1px solid #E2D5BC;
    border-radius: 10px;
    margin-bottom: 28px;
    font-size: 12px;
    color: #5A4020;
}
.lsce-context-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #E2D5BC;
    white-space: nowrap;
}
.lsce-context-item--festival {
    background: #FEF3DC;
    border-color: #C9A86A;
    color: #A0701A;
    font-weight: 600;
}
.lsce-context-icon { font-size: 14px; flex-shrink: 0; }

/* ════════════════════════════════════════
   SECTIONS
════════════════════════════════════════ */
.lsce-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.lsce-section {
    position: relative;
}

.lsce-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--lsce-color, #A0701A);
}

.lsce-section-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #1C1408;
    margin: 0 0 4px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lsce-section-subtitle {
    font-size: 12px;
    color: #9A7C50;
    margin: 0;
}

/* ════════════════════════════════════════
   SONG GRID
════════════════════════════════════════ */
.lsce-songs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media(max-width:900px) { .lsce-songs { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:640px) { .lsce-songs { grid-template-columns: repeat(2, 1fr); gap:10px } }

/* Song card */
.lsce-song-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E2D5BC;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #1C1408;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.lsce-song-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border-color: var(--lsce-color, #C9A86A);
}

/* Thumb */
.lsce-song-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #F5F0E8;
    overflow: hidden;
}
.lsce-song-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.lsce-song-card:hover .lsce-song-thumb img {
    transform: scale(1.05);
}
.lsce-song-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: .5;
}

/* Play button overlay */
.lsce-song-play {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    opacity: 0;
    transition: opacity .2s;
}
.lsce-song-card:hover .lsce-song-play { opacity: 1; }

/* Info */
.lsce-song-info {
    padding: 10px 12px 12px;
    flex: 1;
}
.lsce-song-title {
    font-size: 13px;
    font-weight: 600;
    color: #1C1408;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lsce-song-singer {
    font-size: 11px;
    color: #A0701A;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lsce-song-movie {
    font-size: 11px;
    color: #9A7C50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════ */
.lsce-empty {
    padding: 60px 20px;
    text-align: center;
    color: #9A7C50;
}
.lsce-empty-icon { font-size: 48px; margin-bottom: 14px; }
.lsce-empty h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #1C1408;
    margin-bottom: 8px;
}
.lsce-empty p { font-size: 13px; }

/* ════════════════════════════════════════
   SECTION MAIN TITLE (shortcode attr)
════════════════════════════════════════ */
.lsce-section-main-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #1C1408;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E2D5BC;
}
