/* SLMG Stream — landing page (mobile-first dark theme).
   Sits on top of the host theme but isolates inside .pap-stream-app. */

/* Full-bleed escape: width:95% resolves against the parent theme container,
   not the viewport — so on a WP site that wraps the shortcode in its own
   content container, the layout shrinks. Using vw + negative-margin calc
   forces 95% of viewport regardless of parent constraints. */
.pap-stream-app {
    box-sizing: border-box;
    width: 95vw;
    max-width: 95vw;
    margin-left: calc(50% - 47.5vw);
    margin-right: calc(50% - 47.5vw);
    padding: 16px 12px 120px;
    color: #fff;
    background: #1a1a1a;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.pap-stream-app * { box-sizing: border-box; }

.pap-stream-header {
    position: relative;
    text-align: center;
    padding: 24px 0 16px;
}
.pap-stream-header-loggedin {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px;
}
.pap-stream-brand {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    color: #fff;
}
.pap-stream-tagline {
    color: #aaa;
    font-size: 14px;
    margin: 4px 0 0;
}
.pap-stream-greeting {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    color: #fff;
}

.pap-stream-gear {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
}
.pap-stream-gear-menu {
    position: absolute;
    top: 56px;
    right: 8px;
    background: #282828;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    min-width: 200px;
    z-index: 10000;
}
.pap-stream-gear-menu[hidden] { display: none; }
.pap-stream-gear-menu ul { list-style: none; margin: 0; padding: 8px 0; }
.pap-stream-gear-menu li { margin: 0; }
.pap-stream-gear-menu a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}
.pap-stream-gear-menu a:hover,
.pap-stream-gear-menu a:focus { background: #333; }

.pap-stream-login { margin: 16px 0 24px; }
.pap-stream-login form { margin: 0; }
.pap-stream-login form p { margin: 12px 0; color: #aaa; }
.pap-stream-login form label { color: #aaa; font-size: 13px; }
.pap-stream-login form input[type="text"],
.pap-stream-login form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: #282828;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 4px;
}
.pap-stream-login form input[type="checkbox"] { margin-right: 6px; }
.pap-stream-login form .login-remember { color: #aaa; font-size: 13px; }
.pap-stream-login form input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: var(--pap-color, #1db954);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0.3px;
}
.pap-stream-login-meta {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.pap-stream-login-meta a { color: #aaa; text-decoration: none; }
.pap-stream-login-meta a:hover { color: #fff; }

.pap-stream-section { margin: 28px 0; }
.pap-stream-section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #aaa;
    letter-spacing: 1px;
    margin: 0 0 12px;
    font-weight: 600;
}

.pap-stream-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Tile is rendered as either an <a> (new-release / unowned) or a <button>
   (owned-library, taps to add-to-current-playlist). Both share visuals. */
.pap-stream-tile {
    display: block;
    width: 100%;
    text-align: left;
    color: #fff;
    text-decoration: none;
    background: #222;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s ease;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.pap-stream-tile:active { transform: scale(0.97); }
.pap-stream-tile-art {
    aspect-ratio: 1 / 1;
    background: #111;
    position: relative;
    overflow: hidden;
}
.pap-stream-tile-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pap-stream-tile-art-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333, #555);
}
.pap-stream-tile-meta { padding: 8px 6px 10px; }
.pap-stream-tile-title {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pap-stream-tiles-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 32px 0;
    font-size: 14px;
}

.pap-stream-see-all { text-align: right; margin: 10px 0 0; }
.pap-stream-see-all a {
    color: var(--pap-color, #1db954);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.pap-stream-see-all a:hover { text-decoration: underline; }

/* Toast confirmation shown after an owned-tile tap adds tracks to the
   current playlist. Stays visible ~2.5s then fades. */
#pap-stream-toast {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(40, 40, 40, 0.96);
    color: #fff;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 100000;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
#pap-stream-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 600px) {
    .pap-stream-tiles { gap: 14px; }
    .pap-stream-tile-meta { padding: 10px 8px 12px; }
    .pap-stream-tile-title { font-size: 13px; }
}
