/* ── SPL Song Requester — Frontend Form ───────────────────────────────────── */

.spl-sr-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}

.spl-sr-heading {
    font-size: 1.5em;
    margin-bottom: 1em;
    color: inherit;
}

/* ── Search row ── */
.spl-sr-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.spl-sr-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    background: #fff;
    color: #333;
}

.spl-sr-input:focus {
    outline: none;
    border-color: #1d7a3e;
    box-shadow: 0 0 0 3px rgba(29, 122, 62, 0.12);
}

.spl-sr-input--name {
    margin-top: 4px;
}

/* ── Buttons ── */
.spl-sr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.spl-sr-btn--primary {
    background: #1d7a3e;
    color: #fff;
}

.spl-sr-btn--primary:hover {
    background: #165f30;
}

.spl-sr-btn--primary:active {
    transform: scale(0.98);
}

.spl-sr-btn--large {
    padding: 14px 28px;
    font-size: 1.1em;
    margin-top: 16px;
}

.spl-sr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spl-sr-link-btn {
    background: none;
    border: none;
    color: #1d7a3e;
    font-size: 0.9em;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-left: 10px;
}

.spl-sr-link-btn:hover {
    color: #165f30;
}

/* ── Status messages ── */
.spl-sr-status-msg {
    min-height: 1.4em;
    font-size: 0.9em;
    margin: 6px 0;
    padding: 6px 0;
    color: #666;
}

.spl-sr-status-msg.is-error {
    color: #c0392b;
}

.spl-sr-status-msg.is-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spl-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 6px;
}

@keyframes spl-spin {
    to { transform: rotate(360deg); }
}

/* ── Search results list ── */
.spl-sr-results {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.spl-sr-results.is-visible {
    display: block;
}

.spl-sr-results li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
    font-size: 0.95em;
    line-height: 1.4;
}

.spl-sr-results li:last-child {
    border-bottom: none;
}

.spl-sr-results li:hover,
.spl-sr-results li.is-selected {
    background: #eaf5ee;
}

.spl-sr-results li.is-selected {
    border-left: 3px solid #1d7a3e;
}

.spl-sr-result-title {
    font-weight: 600;
    color: #222;
}

.spl-sr-result-artist {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
}

/* ── Free-text fallback ── */
.spl-sr-freetext-wrap {
    margin-top: 12px;
    padding: 14px;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #eee;
}

.spl-sr-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
}

/* ── Confirm step ── */
.spl-sr-selection-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #eaf5ee;
    border-radius: 6px;
    border: 1px solid #b2d9be;
    margin-bottom: 16px;
}

.spl-sr-selection-label {
    font-size: 0.85em;
    color: #555;
    font-weight: 600;
}

.spl-sr-selected-track {
    font-weight: 700;
    color: #1d7a3e;
    font-size: 1.05em;
    flex: 1;
}

.spl-sr-name-row {
    margin-bottom: 8px;
}

/* ── Success ── */
.spl-sr-success {
    text-align: center;
    padding: 32px 20px;
}

.spl-sr-success-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 12px;
}

.spl-sr-success-text {
    font-size: 1.1em;
    color: #1d7a3e;
    font-weight: 600;
    margin-bottom: 16px;
}
