/* Global Notification & Confirmation styles */

/* Delete confirmation modal (cdm) */
#cdm-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

#cdm-backdrop.cdm-open {
    display: flex;
}

#cdm-card {
    background: var(--color-surface-raised);
    border-radius: 12px;
    padding: 28px 32px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: cdm-in 0.15s ease;
}

@keyframes cdm-in {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

#cdm-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--lodge-dark);
}

#cdm-card p {
    margin: 0 0 24px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cdm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#cdm-confirm-btn {
    background: var(--color-error-text, #dc2626);
    border: 2px solid var(--color-error-text, #dc2626);
    color: white;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s;
}

#cdm-confirm-btn:hover {
    filter: brightness(0.9);
}

/* Cancel button uses global .button-outline class */
#cdm-cancel-btn {
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 0.9rem;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toast-in 0.25s ease;
}

.toast.toast-out {
    animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(30px); }
}

.toast-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border-left: 4px solid var(--color-success);
}

.toast-info {
    background: var(--color-info-bg);
    color: var(--color-info-text);
    border-left: 4px solid var(--color-info);
}

.toast-error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border-left: 4px solid var(--color-error-text, #dc2626);
}

.toast-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border-left: 4px solid var(--color-warning);
}

.toast i {
    font-size: 1rem;
    flex-shrink: 0;
}

@media (width <= 768px) {
    #toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    .toast {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #cdm-card,
    .toast {
        animation: none !important;
    }
}
