/*
 * The site's own dialog (public/js/dialog.js), in place of the browser's confirm() and prompt().
 * Plain CSS, no Tailwind: the admin pages and the wallet both load it, and the dialog is made
 * by a script, so Tailwind's class scan would not see its classes once the CDN build is replaced.
 * Dark with the theme: <html class="dark">.
 */
.ev-dialog {
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: .9rem;
    width: min(24rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    background: #ffffff;
    color: #111827;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.ev-dialog::backdrop { background: rgba(0, 0, 0, .45); }

.ev-dialog-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 0;
    padding: 1.25rem 1.25rem 1rem;
}
.ev-dialog-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.ev-dialog-message { margin: 0; font-size: .95rem; line-height: 1.45; color: #374151; white-space: pre-line; overflow-wrap: anywhere; }
.ev-dialog-input {
    box-sizing: border-box;
    width: 100%;
    padding: .55rem .65rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    background: #ffffff;
    color: inherit;
    font: inherit;
}
.ev-dialog-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; }

.ev-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .25rem; }
.ev-dialog-btn {
    min-height: 2.5rem;
    padding: .5rem 1.1rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.ev-dialog-btn:hover { background: #f3f4f6; }
.ev-dialog-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.ev-dialog-btn-ok { border-color: #2563eb; background: #2563eb; color: #ffffff; font-weight: 600; }
.ev-dialog-btn-ok:hover { background: #1d4ed8; }
.ev-dialog-btn-danger { border-color: #dc2626; background: #dc2626; }
.ev-dialog-btn-danger:hover { background: #b91c1c; }

.dark .ev-dialog { background: #1f2937; color: #f3f4f6; }
.dark .ev-dialog-message { color: #d1d5db; }
.dark .ev-dialog-input { border-color: #4b5563; background: #374151; }
.dark .ev-dialog-btn { border-color: #4b5563; }
.dark .ev-dialog-btn:hover { background: #374151; }
.dark .ev-dialog-btn-ok { border-color: #2563eb; background: #2563eb; }
.dark .ev-dialog-btn-ok:hover { background: #1d4ed8; }
.dark .ev-dialog-btn-danger { border-color: #dc2626; background: #dc2626; }
.dark .ev-dialog-btn-danger:hover { background: #b91c1c; }

@media (max-width: 480px) {
    .ev-dialog-btn { flex: 1; }
}
