/**
 * Toast Notification & Custom Modal Confirmation Styles
 * Modern, Elegant, PMI Theme (Red & White with Gold Accents)
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
}

/* Toast Card Item */
.toast-item {
    pointer-events: auto;
    background: #ffffff;
    color: #1e293b;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-left: 6px solid #dc2626;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #fecaca;
    border-right: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
}

/* Stage Dark Mode Variant */
.toast-item.toast-stage {
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 6px solid #ef4444;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(220, 38, 38, 0.3);
}

.toast-item.toast-success { border-left-color: #10b981; }
.toast-item.toast-danger, .toast-item.toast-error { border-left-color: #dc2626; }
.toast-item.toast-warning { border-left-color: #f59e0b; }
.toast-item.toast-info { border-left-color: #3b82f6; }

.toast-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: #0f172a;
}
.toast-stage .toast-title {
    color: #ffffff;
}

.toast-message {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #475569;
}
.toast-stage .toast-message {
    color: #cbd5e1;
}

.toast-close {
    background: transparent;
    border: none;
    font-size: 1.35rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
    margin-left: 6px;
    flex-shrink: 0;
}
.toast-close:hover {
    color: #ef4444;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3.5px;
    background: #dc2626;
    width: 100%;
    animation: toastProgress linear forwards;
}
.toast-success .toast-progress { background: #10b981; }
.toast-warning .toast-progress { background: #f59e0b; }
.toast-info .toast-progress { background: #3b82f6; }

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
}

/* Custom Confirm Dialog Modal */
.custom-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: confirmFadeIn 0.2s ease;
}

.custom-confirm-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid #fecaca;
    text-align: center;
    animation: confirmPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-confirm-card.stage-mode {
    background: #0f172a;
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(220, 38, 38, 0.3);
}

.confirm-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff1f2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}

.stage-mode .confirm-icon-wrap {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.confirm-message {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 24px;
}

.stage-mode .confirm-message {
    color: #cbd5e1;
}

.confirm-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn-cancel {
    padding: 11px 22px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.confirm-btn-cancel:hover {
    background: #e2e8f0;
}

.stage-mode .confirm-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.15);
}
.stage-mode .confirm-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.confirm-btn-ok {
    padding: 11px 24px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    background: #dc2626;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.2s;
}
.confirm-btn-ok:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes confirmPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
