/*
 * Songverzoek-formulier (mockup-stijl). Alle classes beginnen met .sbsr zodat
 * de stijl los staat van de rest van het thema/Elementor.
 */
.sbsr {
    --sbsr-bg: #faf7fd;
    --sbsr-ink: #271a33;
    --sbsr-purple-a: #7c3aed;
    --sbsr-purple-b: #9333ea;
    --sbsr-radius: 12px;

    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: var(--sbsr-bg);
    color: var(--sbsr-ink);
    border-radius: var(--sbsr-radius);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

.sbsr * {
    box-sizing: border-box;
}

.sbsr__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 2rem;
    margin: 0 0 0.25rem;
    line-height: 1.1;
}

.sbsr__intro {
    margin: 0 0 1.5rem;
    opacity: 0.85;
    line-height: 1.5;
}

.sbsr__field {
    margin-bottom: 1rem;
}

.sbsr__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.sbsr__optional {
    font-weight: 400;
    opacity: 0.6;
}

.sbsr__input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--sbsr-radius);
    background: #fff;
    color: var(--sbsr-ink);
    font-size: 1rem;
    font-family: inherit;
}

.sbsr__input:focus {
    outline: none;
    border-color: var(--sbsr-purple-a);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Honeypot: visually hidden, off-screen, never focusable by humans. */
.sbsr__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sbsr__button {
    display: inline-block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: var(--sbsr-radius);
    background: linear-gradient(135deg, var(--sbsr-purple-a), var(--sbsr-purple-b));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.sbsr__button:hover {
    opacity: 0.92;
}

.sbsr__button:active {
    transform: translateY(1px);
}

.sbsr__button[disabled] {
    opacity: 0.6;
    cursor: default;
}

.sbsr__privacy {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    opacity: 0.65;
    line-height: 1.4;
}

.sbsr__status {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--sbsr-radius);
    font-weight: 600;
    display: none;
}

.sbsr__status.is-visible {
    display: block;
}

.sbsr__status--ok {
    background: rgba(124, 58, 237, 0.1);
    color: var(--sbsr-purple-b);
}

.sbsr__status--error {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* --- v2: Spotify search, chosen track, voting wall --- */

.sbsr__search {
    position: relative;
}

.sbsr__results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--sbsr-radius);
    box-shadow: 0 12px 30px rgba(39, 26, 51, 0.12);
    max-height: 22rem;
    overflow-y: auto;
    display: none;
}

.sbsr__results.is-visible {
    display: block;
}

.sbsr__result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--sbsr-ink);
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
}

.sbsr__result:hover,
.sbsr__result:focus {
    background: rgba(124, 58, 237, 0.07);
    outline: none;
}

.sbsr__art {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: var(--sbsr-radius);
    object-fit: cover;
    background: rgba(124, 58, 237, 0.1);
}

.sbsr__result-text {
    min-width: 0;
}

.sbsr__result-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbsr__result-artist {
    font-size: 0.85rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbsr__chosen {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--sbsr-radius);
}

.sbsr__chosen.is-visible {
    display: flex;
}

.sbsr__chosen-text {
    flex: 1;
    min-width: 0;
}

.sbsr__chosen-change {
    border: none;
    background: none;
    color: var(--sbsr-purple-b);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.sbsr__freetext-toggle {
    display: inline-block;
    margin: 0.25rem 0 1rem;
    border: none;
    background: none;
    padding: 0;
    color: var(--sbsr-purple-b);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

.sbsr__manual {
    display: none;
}

.sbsr__manual.is-visible {
    display: block;
}

.sbsr__preview {
    margin-left: auto;
}

.sbsr__preview audio {
    height: 32px;
}

/* Voting wall */
.sbsr-wall {
    max-width: 32rem;
    margin: 1.5rem auto 0;
    padding: 1.5rem;
    background: var(--sbsr-bg, #faf7fd);
    color: var(--sbsr-ink, #271a33);
    border-radius: 12px;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

.sbsr-wall * {
    box-sizing: border-box;
}

.sbsr-wall__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 0.25rem;
}

.sbsr-wall__intro {
    margin: 0 0 1rem;
    opacity: 0.8;
}

.sbsr-wall__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sbsr-wall__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.sbsr-wall__text {
    flex: 1;
    min-width: 0;
}

.sbsr-wall__song {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.sbsr-wall__artist {
    font-size: 0.85rem;
    opacity: 0.7;
}

.sbsr-wall__vote {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: 999px;
    background: #fff;
    color: var(--sbsr-purple-b, #9333ea);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.sbsr-wall__vote.is-voted {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    border-color: transparent;
    color: #fff;
}

.sbsr-wall__empty {
    opacity: 0.7;
}

/* --- Intro + call-to-action button --- */
.sbsr-intro {
    max-width: 32rem;
    margin: 0 auto 1.5rem;
    text-align: center;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: #271a33;
}

.sbsr-intro .sbsr__intro {
    margin: 0 0 1rem;
}

.sbsr__button--cta {
    display: inline-block;
    width: auto;
    min-width: 14rem;
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    /* Outside the .sbsr scope, so the variables are not available: set explicit values. */
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    font-weight: 700;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.3);
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.sbsr__button--cta:hover {
    opacity: 0.92;
}

.sbsr__closed {
    display: inline-block;
    margin: 0 auto;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    background: #faf7fd;
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: #271a33;
    font-weight: 600;
}

/* --- Request modal --- */
.sbsr-noscroll {
    overflow: hidden;
}

.sbsr-modal[hidden] {
    display: none;
}

.sbsr-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sbsr-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(39, 26, 51, 0.55);
    backdrop-filter: blur(3px);
}

.sbsr-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 34rem;
    margin: auto;
    animation: sbsr-modal-in 0.18s ease-out;
}

/* The form already carries the card background/padding; keep it edge-to-edge. */
.sbsr-modal__panel .sbsr {
    margin: 0;
    box-shadow: 0 24px 60px rgba(39, 26, 51, 0.35);
}

.sbsr-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: #271a33;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.sbsr-modal__close:hover {
    background: #fff;
}

@keyframes sbsr-modal-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
