/*
 * Deadwood Trail website theme for SweetAlert2 prompts and toasts.
 * Load after the vendor styles in page-wrapper.html so Settings and other
 * website pages share the site's palette, typography, and action states.
 */
div.swal2-container.swal2-backdrop-show {
    background: rgba(13, 9, 12, 0.78);
}

.swal2-container .swal2-popup {
    --dialog-highlight: var(--dh-yellow, #f0bf7c);
    --dialog-ink: #faecd8;
    --dialog-muted: #d9c7b7;
    background: var(--dh-dark, #221a1c);
    border: 1px solid #8b5f49;
    border-radius: 12px;
    box-shadow: inset 0 0 0 3px #181218, 0 20px 60px #080609a6;
    color: var(--dialog-ink);
    font-family: inherit;
}

.swal2-popup .swal2-title {
    color: var(--dialog-highlight);
    font-family: 'Rye', Georgia, serif;
    font-size: clamp(1.15rem, 3.5vw, 1.55rem);
    font-weight: 400;
    line-height: 1.35;
}

.swal2-popup .swal2-html-container,
.swal2-popup .swal2-input-label,
.swal2-popup .swal2-footer {
    color: var(--dialog-ink);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.swal2-popup .swal2-html-container {
    margin-inline: clamp(1rem, 5vw, 1.65rem);
    font-size: 1rem;
}

.swal2-popup .swal2-html-container:has(+ input.swal2-input) {
    text-align: start;
}

.swal2-popup a {
    color: var(--dialog-highlight);
    text-underline-offset: 0.2em;
}

.swal2-popup :is(.swal2-input, .swal2-textarea, .swal2-file, .swal2-select) {
    max-width: 100%;
    min-width: 0;
    background: var(--dh-black, #19151b);
    border: 1px solid #987362;
    border-radius: 6px;
    color: var(--dialog-ink);
    font: inherit;
}

.swal2-popup :is(.swal2-input, .swal2-textarea)::placeholder {
    color: var(--dialog-muted);
}

.swal2-popup .swal2-actions {
    max-width: calc(100% - 1.5rem);
    gap: 0.5rem;
}

.swal2-popup .swal2-styled {
    min-height: 44px;
    margin: 0;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    white-space: normal;
}

.swal2-popup .swal2-confirm.swal2-styled {
    background-color: var(--dialog-highlight);
    color: #25160e;
}

.swal2-popup .swal2-confirm.swal2-styled[style*="background-color"],
.swal2-popup .swal2-deny.swal2-styled {
    color: #fff;
}

.swal2-popup .swal2-cancel.swal2-styled {
    background-color: #33282d;
    border-color: #987362;
    color: var(--dialog-ink);
}

.swal2-popup :is(button, a, input, textarea, select):focus-visible {
    outline: 2px solid #ffd89b;
    outline-offset: 3px;
    box-shadow: none;
}

.swal2-popup .swal2-validation-message {
    background: #462024;
    color: #ffd9d5;
    line-height: 1.45;
}

.swal2-popup .swal2-icon.swal2-warning {
    border-color: var(--dialog-highlight);
    color: var(--dialog-highlight);
}

.swal2-popup.swal2-toast {
    padding: 0.75rem 1rem;
}

.swal2-popup.swal2-toast .swal2-title {
    font: 700 1rem/1.35 'Instrument Sans', system-ui, sans-serif;
}

.swal2-popup .swal2-timer-progress-bar {
    background: #f0bf7c66;
}

@media (max-height: 640px) {
    .swal2-popup.swal2-modal .swal2-icon {
        margin-block: 0.75rem 0.2rem;
        font-size: 0.65rem;
    }

    .swal2-popup.swal2-modal .swal2-title {
        padding-top: 0.5rem;
    }

    .swal2-popup.swal2-modal .swal2-html-container {
        max-height: 44vh;
        overflow: auto;
        scrollbar-color: #987362 var(--dh-dark, #221a1c);
        font-size: 0.94rem;
        line-height: 1.4;
    }

    .swal2-popup.swal2-modal .swal2-input,
    .swal2-popup.swal2-modal .swal2-actions {
        margin-top: 0.75rem;
    }
}
