/* =========================================================
   WEDDING PLAYLIST
   ========================================================= */

#playlist {
    min-height: 100vh;
    padding: 120px 40px;
    background: var(--background);
    color: var(--text);
    box-sizing: border-box;
}

.playlist-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */

#playlist .playlist-container > h2 {
    margin: 0;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 4rem;
    font-weight: 500;
    color: var(--text);
}

#playlist .playlist-container > .divider {
    width: 100px;
    height: 2px;
    margin: 30px auto 60px;
    background: var(--gold);
}

/* =========================================================
   TWO COLUMN LAYOUT
   ========================================================= */

.playlist-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 30px;
    align-items: stretch;
}

.playlist-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
        min-width: 0;
}

/* =========================================================
   TILES
   ========================================================= */

#playlist .playlist-tile {
    background: #ffffff;
    border: 1px solid var(--gold);
    border-radius: 20px;
    color: var(--text);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.playlist-tile-content {
    padding: 40px;
}

/* =========================================================
   TILE HEADINGS
   ========================================================= */

#playlist .playlist-tile h3 {
    margin: 0;
    text-align: center;

    font-family: var(--heading-font);
    font-size: 2.2rem;
    font-weight: 600;

    color: var(--text);
}

/* =========================================================
   DECORATIVE ICON
   ========================================================= */

.playlist-decoration {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
    margin: 12px 0 25px;

    color: var(--gold);
    font-size: 17px;
}

.playlist-decoration::before,
.playlist-decoration::after {
    content: "";

    width: 25px;
    height: 1px;

    background: var(--gold);
    opacity: 0.8;
}

/* =========================================================
   TEXT
   ========================================================= */

#playlist .playlist-tile p {
    color: var(--text);
    line-height: 1.8;
}

.playlist-intro-tile p {
    margin-bottom: 20px;
}

.playlist-intro-tile p:last-child {
    margin-bottom: 0;
}

#playlist .playlist-tile strong {
    color: var(--text);
    font-weight: 600;
}

/* =========================================================
   SEARCH
   ========================================================= */

.playlist-search {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.playlist-search input {
    flex: 1;
    min-width: 0;

    height: 52px;
    padding: 0 17px;

    border: 1px solid #d8d5cf;
    border-radius: 8px;

    background: #ffffff;

    font-family: var(--body-font);
    font-size: 14px;

    color: var(--text);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.playlist-search input::placeholder {
    color: #858995;
}

.playlist-search input:focus {
    border-color: var(--gold);

    box-shadow:
        0 0 0 3px rgba(199, 157, 61, 0.1);
}

/* =========================================================
   SEARCH BUTTON
   ========================================================= */

.playlist-search button {
    height: 52px;
    min-width: 125px;

    padding: 0 25px;

    border: 1px solid var(--gold);
    border-radius: 0;

    background: var(--gold);
    color: #ffffff;

    font-family: var(--body-font);
    font-size: 12px;
    font-weight: 600;

    letter-spacing: 2px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.playlist-search button:hover {
    background: #b88f32;
    transform: translateY(-1px);
}

/* =========================================================
   SEARCH RESULTS
   ========================================================= */

/* =========================================================
   SPOTIFY SEARCH RESULTS
   Compact dropdown-style results
   ========================================================= */

.playlist-search {
    position: relative;
}

.song-search-results {
    position: relative;
    width: 100%;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid rgba(199, 157, 61, 0.45);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}


/* ---------------------------------------------------------
   Individual Spotify result
   --------------------------------------------------------- */

.spotify-search-result {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 64px;

    padding: 10px 14px;
    box-sizing: border-box;

    border-bottom: 1px solid #eeeae3;

    background: #ffffff;

    transition: background 0.15s ease;
}

.spotify-search-result:last-child {
    border-bottom: none;
}

.spotify-search-result:hover {
    background: #faf8f3;
}


/* ---------------------------------------------------------
   Song information
   --------------------------------------------------------- */

.spotify-search-result-info {
    flex: 1;
    min-width: 0;
    padding-right: 15px;
}

.spotify-search-result-title {
    margin: 0 0 3px;

    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;

    line-height: 1.35;

    color: var(--navy);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-search-result-artist {
    margin: 0;

    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 400;

    line-height: 1.35;

    color: #777b87;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ---------------------------------------------------------
   Add button
   --------------------------------------------------------- */

.spotify-add-button {
    flex-shrink: 0;

    height: 34px;
    min-width: 60px;

    padding: 0 14px;

    border: 1px solid var(--gold);
    border-radius: 5px;

    background: var(--gold);
    color: #ffffff;

    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 600;

    letter-spacing: 1px;

    cursor: pointer;
}

.spotify-add-button:disabled {
    opacity: 0.65;
    cursor: default;
}


/* ---------------------------------------------------------
   Empty / loading messages
   --------------------------------------------------------- */

.song-search-empty,
.song-search-loading {
    padding: 18px;

    text-align: center;

    font-family: "Poppins", sans-serif;
    font-size: 13px;

    color: #777b87;

    background: #ffffff;
}

.playlist-result {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 12px;
    margin-bottom: 10px;

    border: 1px solid #e4e1db;
    border-radius: 10px;

    background: #ffffff;
}

.playlist-result-image {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    border-radius: 6px;

    object-fit: cover;
}

.playlist-result-info {
    flex: 1;
    min-width: 0;
}

.playlist-result-title {
    margin: 0 0 3px;

    color: var(--text);
    font-weight: 500;
}

.playlist-result-artist {
    margin: 0;

    color: #777b87;
    font-size: 13px;
}

/* =========================================================
   CURRENT PLAYLIST
   ========================================================= */

.playlist-current-tile {
    height: 100%;
}

.playlist-subtitle {
    margin: 0 0 25px;

    text-align: center;

    color: #666 !important;
    line-height: 1.7;
}

.requested-songs {
    min-height: 500px;

    padding: 22px;

    background: #faf9f6;

    border-radius: 14px;
}

/* =========================================================
   EMPTY PLAYLIST
   ========================================================= */

.requested-song-placeholder {
    min-height: 450px;

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    color: #777b87 !important;

    font-size: 14px;
}

/* =========================================================
   REQUESTED SONG
   ========================================================= */

.playlist-song {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 14px 0;

    border-bottom: 1px solid #e4e1db;
}

.playlist-song:first-child {
    padding-top: 0;
}

.playlist-song:last-child {
    border-bottom: none;
}

.playlist-song-image {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    border-radius: 6px;

    object-fit: cover;
}

.playlist-song-info {
    flex: 1;
    min-width: 0;
}

.playlist-song-title {
    margin: 0 0 3px;

    color: var(--text) !important;
    font-weight: 500;
}

.playlist-song-artist {
    margin: 0;

    color: #777b87 !important;
    font-size: 13px;
}

.playlist-song-guest {
    margin-top: 4px;

    color: var(--gold) !important;
    font-size: 11px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 850px) {

    #playlist {
        padding: 90px 5%;
    }

    #playlist .playlist-container > h2 {
        font-size: 3.2rem;
    }

    .playlist-layout {
    grid-template-columns: minmax(0, 1fr);
}


    .playlist-tile-content {
        padding: 32px 25px;
    }

    .requested-songs {
        min-height: 350px;
    }

    .requested-song-placeholder {
        min-height: 300px;
    }
}

@media (max-width: 550px) {

    #playlist {
        padding: 70px 20px;
    }

    #playlist .playlist-container > h2 {
        font-size: 2.8rem;
    }

    .playlist-tile {
        border-radius: 18px;
    }

    .playlist-tile-content {
        padding: 28px 20px;
    }

    #playlist .playlist-tile h3 {
        font-size: 1.9rem;
    }

    .playlist-search {
        flex-direction: column;
    }

    .playlist-search button {
        width: 100%;
    }

    .playlist-result {
        align-items: flex-start;
    }
}

/* =========================================
   Requested Songs
========================================= */

.requested-song{

    display:flex;

    align-items:center;

    gap:16px;

    padding:14px 16px;

    border-bottom:1px solid rgba(205,163,73,.18);

    transition:
        background .25s ease,
        transform .25s ease;

}

.requested-song:last-child{

    border-bottom:none;

}

.requested-song:hover{

    background:rgba(205,163,73,.06);

    transform:translateX(3px);

}


/* Album artwork */

.requested-song-artwork{

    width:58px;

    height:58px;

    flex:0 0 58px;

    border-radius:8px;

    overflow:hidden;

    background:#f4efe6;

    box-shadow:
        0 4px 12px rgba(0,0,0,.08);

}

.requested-song-artwork img{

    width:100%;

    height:100%;

    display:block;

    object-fit:cover;

}


/* Fallback if artwork isn't available */

.requested-song-artwork-placeholder{

    width:100%;

    height:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    color:var(--gold);

    font-size:1.5rem;

    font-family:var(--heading-font);

}


/* Song information */

.requested-song-info{

    min-width:0;

    flex:1;

}

.requested-song-title{

    font-size:1rem;

    font-weight:600;

    color:var(--text);

    line-height:1.35;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.requested-song-artist{

    margin-top:4px;

    font-size:.9rem;

    color:#777;

    line-height:1.3;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

/* =========================================
   My Song
========================================= */

.my-song-container {

    margin-top:20px;

    margin-bottom:20px;

}

.my-song-label {

    font-size:.72rem;

    letter-spacing:.14em;

    color:var(--gold);

    font-weight:600;

    margin-bottom:8px;

}

.my-song-card {

    display:flex;

    align-items:center;

    gap:14px;

    padding:12px;

    border:1px solid rgba(205,163,73,.35);

    border-radius:10px;

    background:rgba(255,255,255,.45);

}

.my-song-artwork {

    width:52px;

    height:52px;

    flex:0 0 52px;

    border-radius:7px;

    overflow:hidden;

    background:#f4efe6;

}

.my-song-artwork img {

    width:100%;

    height:100%;

    display:block;

    object-fit:cover;

}

.my-song-placeholder {

    width:100%;

    height:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    color:var(--gold);

    font-size:1.4rem;

}

.my-song-info {

    min-width:0;

    flex:1;

}

.my-song-title {

    font-size:.95rem;

    font-weight:600;

    color:var(--text);

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.my-song-artist {

    margin-top:3px;

    font-size:.82rem;

    color:#777;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.change-song-button {

    flex-shrink:0;

    border:1px solid var(--gold);

    background:transparent;

    color:var(--gold);

    padding:8px 12px;

    border-radius:6px;

    font-size:.75rem;

    cursor:pointer;

    transition:
        background .2s ease,
        color .2s ease;

}

.change-song-button:hover {

    background:var(--gold);

    color:white;

}