/**
 * Sports Guess Who - Modals, Dialogs, Form Controls & Interactive Settings UI
 */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(16px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content, .modal-card {
    background: rgba(24, 24, 27, 0.96);
    padding: 34px 38px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2, .modal-card h2 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Setting Rows */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

/* Switch & Slider */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
    border-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: white;
}

input:disabled + .slider {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Theme Color Selector */
.theme-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}

.theme-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    padding: 0;
}

.theme-dot:hover {
    transform: scale(1.15);
}

.theme-dot.active {
    transform: scale(1.25);
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Volume Slider */
.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 110px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
    transition: transform 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.volume-slider:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.volume-val {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 38px;
    text-align: right;
    font-weight: 700;
}

/* Segmented Pill Selectors */
.option-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.opt-btn, .speed-btn, .style-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.opt-btn:hover, .speed-btn:hover, .style-btn:hover {
    color: var(--text);
}

.opt-btn.active, .speed-btn.active, .style-btn.active {
    background: var(--accent);
    color: white;
}

/* Modal Buttons */
.close-modal-btn, .modal-footer-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 14px;
    transition: all 0.2s ease;
}

.close-modal-btn:hover, .modal-footer-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.close-modal-btn.primary, .modal-footer-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
}

.close-modal-btn.primary:hover, .modal-footer-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
