/* === Overlay === */
.z-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === Modal shell === */
.z-modal {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-family: ui-sans-serif, system-ui, sans-serif;
    color: #111827;
    overflow: hidden;
}

/* === Title === */
.z-modal-title {
    padding: 12px 14px;
    font-weight: 600;
    font-size: 1rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

/* === Message === */
.z-modal-message {
    padding: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #374151;
}

/* === Input (prompt) === */
.z-modal-input {
    display: block;
    width: calc(100% - 28px);
    margin: 0 14px 14px;
    padding: 0.3em 0.4em;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font: inherit;
}

/* === Footer / buttons === */
.z-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.z-modal-buttons button {
    padding: 0.25em 0.75em;
    line-height: 1.2;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

/* === Button variants === */
.z-modal-buttons .ok,
.z-modal-buttons .yes {
    background-color: #3b82f6;
    color: white;
}

.z-modal-buttons .ok:hover,
.z-modal-buttons .yes:hover {
    background-color: #2563eb;
}

.z-modal-buttons .cancel,
.z-modal-buttons .no {
    background-color: #9ca3af;
    color: white;
}

.z-modal-buttons .cancel:hover,
.z-modal-buttons .no:hover {
    background-color: #6b7280;
}

/* === Modal type accents === */
.z-modal-info {
    border-left: 4px solid #3b82f6;
}

.z-modal-success {
    border-left: 4px solid #10b981;
}

.z-modal-error {
    border-left: 4px solid #ef4444;
}

.z-modal-confirm {
    border-left: 4px solid #f59e0b;
}

.z-modal-alert {
    border-left: 4px solid #3b82f6;
}

/* === Toast notifications === */
.z-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #374151;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10000;
    pointer-events: none;
}

.z-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.z-toast-success {
    background-color: #10b981;
}

.z-toast-error {
    background-color: #ef4444;
}

.z-toast-info {
    background-color: #3b82f6;
}

.z-toast-warning {
    background-color: #f59e0b;
}