/* ==========================================================================
   Global Toast Notification System Styles
   ========================================================================== */

#toast-notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100vw - 32px);
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #3b82f6;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-notification.toast-hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
    }
}

/* Toast Icon Badge */
.toast-notification .toast-icon-badge {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

/* Toast Body */
.toast-notification .toast-content {
    flex-grow: 1;
    padding-right: 8px;
}

.toast-notification .toast-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 3px;
    color: #1e293b;
}

.toast-notification .toast-message {
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
    word-break: break-word;
}

/* Close Button */
.toast-notification .toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease;
    margin-left: 4px;
    margin-top: -2px;
}

.toast-notification .toast-close-btn:hover {
    color: #1e293b;
    background-color: #f1f5f9;
}

/* Progress Bar */
.toast-notification .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.toast-notification .toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transition: transform linear;
}

/* Toast Variants */
/* Success */
.toast-notification.toast-success {
    border-left-color: #10b981;
}
.toast-notification.toast-success .toast-icon-badge {
    background-color: #ecfdf5;
    color: #10b981;
}
.toast-notification.toast-success .toast-progress-bar {
    background-color: #10b981;
}

/* Error / Danger */
.toast-notification.toast-error,
.toast-notification.toast-danger {
    border-left-color: #ef4444;
}
.toast-notification.toast-error .toast-icon-badge,
.toast-notification.toast-danger .toast-icon-badge {
    background-color: #fef2f2;
    color: #ef4444;
}
.toast-notification.toast-error .toast-progress-bar,
.toast-notification.toast-danger .toast-progress-bar {
    background-color: #ef4444;
}

/* Warning */
.toast-notification.toast-warning {
    border-left-color: #f59e0b;
}
.toast-notification.toast-warning .toast-icon-badge {
    background-color: #fffbeb;
    color: #f59e0b;
}
.toast-notification.toast-warning .toast-progress-bar {
    background-color: #f59e0b;
}

/* Info */
.toast-notification.toast-info {
    border-left-color: #3b82f6;
}
.toast-notification.toast-info .toast-icon-badge {
    background-color: #eff6ff;
    color: #3b82f6;
}
.toast-notification.toast-info .toast-progress-bar {
    background-color: #3b82f6;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    #toast-notification-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}

/* ==========================================================================
   Custom Confirmation Dialog Styles
   ========================================================================== */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.confirm-dialog-overlay.active {
    opacity: 1;
}

.confirm-dialog-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.confirm-dialog-overlay.active .confirm-dialog-modal {
    transform: scale(1) translateY(0);
}

.confirm-dialog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.confirm-dialog-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.confirm-dialog-icon.danger {
    background-color: #fef2f2;
    color: #ef4444;
}

.confirm-dialog-icon.warning {
    background-color: #fffbeb;
    color: #f59e0b;
}

.confirm-dialog-icon.info {
    background-color: #eff6ff;
    color: #3b82f6;
}

.confirm-dialog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.confirm-dialog-body {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-dialog-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-dialog-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.confirm-dialog-btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
}

.confirm-dialog-btn-cancel:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.confirm-dialog-btn-confirm {
    background-color: #3b82f6;
    color: #ffffff;
}

.confirm-dialog-btn-confirm:hover {
    filter: brightness(0.9);
}

.confirm-dialog-btn-confirm.danger {
    background-color: #ef4444;
}

