/* ===== SendTheSong Clone Styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

.sts-form,
.sts-form input,
.sts-form textarea,
.sts-form button,
.sts-song-results,
.sts-selected-song,
.sts-cards-grid,
.sts-song-card,
.sts-carousel,
.sts-browse,
.sts-history,
.sts-notice {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.sts-notice {
    background: #e8ecfb;
    border: 1px solid #b3c0f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.sts-notice strong { display: block; margin-bottom: 6px; }
.sts-notice p { margin: 0; color: #444; }

/* ---- Form ---- */
.sts-form { display: flex; flex-direction: column; gap: 6px; max-width: 700px; }
.sts-form label { font-weight: 600; margin-top: 14px; }
.sts-form input[type="text"],
.sts-form textarea {
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    width: 100%;
}
.sts-form textarea { min-height: 120px; resize: vertical; }
.sts-form button {
    margin-top: 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    cursor: pointer;
}
.sts-form button:disabled { background: #ccc; cursor: not-allowed; }
#sts-submit-status { margin-top: 10px; font-size: 14px; }

.sts-song-results {
    border: 1px solid #eee;
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
}
.sts-song-results:empty { border: none; }
.sts-song-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f2f2f2;
}
.sts-song-option:last-child { border-bottom: none; }
.sts-song-option:hover { background: #f7f7f7; }
.sts-song-option img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sts-song-option .sts-song-option-text { display: flex; flex-direction: column; }
.sts-song-option .sts-song-option-title { font-size: 16px; color: #111; font-weight: 400; }
.sts-song-option .sts-song-option-artist { font-size: 14px; color: #888; }
.sts-selected-song {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
}

/* ---- Cards (used in Carousel + Browse + History) ---- */
.sts-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.sts-song-card {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}
.sts-to-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    width: fit-content;
}
.sts-card-message {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    line-height: 1.4;
    color: #222;
    flex-grow: 1;
}
.sts-song-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.sts-song-info img { width: 44px; height: 44px; border-radius: 6px; }
.sts-song-info .sts-song-meta { flex-grow: 1; }
.sts-song-info .sts-song-title { display: block; font-weight: 600; font-size: 14px; }
.sts-song-info .sts-song-artist { display: block; font-size: 13px; color: #777; }
.sts-song-info a.sts-spotify-link {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* ---- Marquee Carousel (2 rows, opposite directions) ---- */
.sts-marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0 40px;
    overflow: hidden;
}
.sts-marquee-row {
    overflow: hidden;
    width: 100%;
}
.sts-marquee-track {
    display: flex;
    gap: 20px;
    width: max-content;
}
.sts-marquee-group {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}
.sts-marquee-track .sts-song-card {
    width: 300px;
    flex-shrink: 0;
}

/* Row 1: left se right chalti hai */
.sts-row-left .sts-marquee-track {
    animation: sts-scroll-left 18s linear infinite;
}
/* Row 2: right se left chalti hai (opposite direction) */
.sts-row-right .sts-marquee-track {
    animation: sts-scroll-right 18s linear infinite;
}

@keyframes sts-scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes sts-scroll-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* Hover par pause ho jaye taake user padh sake */
.sts-marquee-row:hover .sts-marquee-track {
    animation-play-state: paused;
}

.sts-loading { padding: 40px; text-align: center; color: #999; }

/* ---- Browse ---- */
.sts-subtitle { color: #555; margin-bottom: 20px; }
.sts-search-row { display: flex; gap: 10px; max-width: 700px; }
.sts-search-row input {
    flex-grow: 1;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 12px 14px;
}
.sts-search-row button {
    background: #111; color: #fff; border: none;
    border-radius: 8px; padding: 0 24px; cursor: pointer;
}

/* ---- History empty state ---- */
.sts-empty-box {
    grid-column: 1 / -1;
    background: #f7f7f7;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #555;
}
.sts-empty-box a { color: #111; font-weight: 600; }
