/* Shared toast + modal dialog styles for the dialogs.js utility.
 * Matches the site design tokens: red #d20a2e, gray #e8e8e8 / #f4f4f4,
 * text #3d3d3d, borders #ddd, cards #fff. */

/* --- Toasts --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #3d3d3d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #3d3d3d;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left-color: #1a9e4b;
}

.toast-error {
    border-left-color: #d20a2e;
}

.toast-icon {
    font-weight: 700;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #1a9e4b;
}

.toast-error .toast-icon {
    color: #d20a2e;
}

/* --- Modal dialogs --- */
.site-dialog {
    border: none;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    background: #fff;
    width: min(420px, calc(100vw - 40px));
    font-family: 'Inter', sans-serif;
    color: #3d3d3d;
}

.site-dialog[open] {
    display: block;
}

.site-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.site-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
}

.site-dialog-title {
    margin: 0;
    font-size: 1.25em;
    font-weight: 700;
    color: #3d3d3d;
}

.site-dialog-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.site-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.site-dialog-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #3d3d3d;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.site-dialog-btn:hover {
    background: #f4f4f4;
    border-color: #bbb;
}

.site-dialog-btn.primary {
    background: #d20a2e;
    border-color: #d20a2e;
    color: #fff;
}

.site-dialog-btn.primary:hover {
    background: #b10928;
    border-color: #b10928;
}

.site-dialog-btn.danger {
    background: #d20a2e;
    border-color: #d20a2e;
    color: #fff;
}

.site-dialog-btn.danger:hover {
    background: #b10928;
    border-color: #b10928;
}