/* ======================================================
   Behdad - Beautiful Alert, Confirm & Toast Notification System
   Ultra smooth animations, modern glassmorphism + elegant design
   Matches Behdad pink theme (#FF1493, #FF69B4)
   ====================================================== */

/* ====================== ALERT (Modal-like) ====================== */
.behdad-alert {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Vazirmatn', sans-serif;
}

.behdad-alert.hidden {
    display: none !important;
}

.alert-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeInBackdrop 0.3s ease forwards;
}

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

.alert-dialog {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 105, 180, 0.08),
        0 10px 30px rgba(255, 20, 147, 0.08);
    overflow: hidden;
    animation: alertPopIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f8e1eb;
}

@keyframes alertPopIn {
    from {
        opacity: 0;
        transform: scale(0.65) translateY(60px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes alertPopOut {
    to {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }
}

/* Icon Circle */
.alert-icon {
    width: 118px;
    height: 118px;
    margin: 32px auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.8rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    position: relative;
    transition: transform 0.3s ease;
}

.alert-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.15;
    z-index: -1;
    filter: blur(12px);
}

.status-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.status-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.status-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.status-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

/* Body */
.alert-body {
    padding: 0 32px 8px;
    text-align: center;
}

.alert-message {
    font-size: 1.18rem;
    line-height: 1.75;
    color: #1e2937;
    margin: 0;
    font-weight: 500;
}

/* Redirect Info */
.alert-redirect-info {
    margin: 22px 0 8px;
    padding: 16px 20px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.redirect-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    color: #475569;
}

#countdown-seconds {
    display: inline-block;
    min-width: 28px;
    font-weight: 800;
    font-size: 1.65rem;
    color: #FF1493;
    text-shadow: 0 2px 4px rgba(255, 20, 147, 0.15);
}

/* Footer Buttons */
.alert-footer {
    padding: 26px 32px 34px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-alert {
    padding: 13px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.02rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.btn-alert-primary {
    background: linear-gradient(135deg, #FF1493, #FF69B4);
    color: white;
    box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
}

.btn-alert-primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 35px rgba(255, 20, 147, 0.5);
}

.btn-alert-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-alert-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* ====================== CONFIRM DIALOG ====================== */
.behdad-confirm {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Vazirmatn', sans-serif;
}

.behdad-confirm.hidden {
    display: none !important;
}

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: fadeInBackdrop 0.25s ease forwards;
}

.confirm-dialog {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 26px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 105, 180, 0.1);
    overflow: hidden;
    animation: confirmPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f8e1eb;
}

@keyframes confirmPopIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes confirmPopOut {
    to {
        opacity: 0;
        transform: scale(0.88) translateY(25px);
    }
}

.confirm-icon {
    width: 98px;
    height: 98px;
    margin: 28px auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.confirm-icon.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.confirm-icon.danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.confirm-icon.info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.confirm-body {
    padding: 0 28px 12px;
    text-align: center;
}

.confirm-message {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #1e2937;
    margin: 0;
    font-weight: 500;
}

.confirm-footer {
    padding: 24px 28px 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm {
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    min-width: 130px;
}

.btn-confirm-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-confirm-cancel:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-confirm-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}

.btn-confirm-danger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.5);
}

.btn-confirm-primary {
    background: linear-gradient(135deg, #FF1493, #FF69B4);
    color: white;
    box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
}

.btn-confirm-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 30px rgba(255, 20, 147, 0.5);
}

/* ====================== TOAST NOTIFICATION ====================== */
.toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-width: 390px;
    width: 100%;
    padding-right: 8px;
    font-family: 'Vazirmatn', sans-serif;
}

.toast {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.13),
        0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 19px 23px 19px 23px;
    display: flex;
    align-items: flex-start;
    gap: 17px;
    border: 1px solid #f0e0e8;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.5s cubic-bezier(0.23, 1.0, 0.32, 1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toast:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 25px 55px rgba(0, 0, 0, 0.16),
        0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.toast.closing {
    animation: toastSlideOut 0.38s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(140%) scale(0.92);
    }
}

/* Toast Icon */
.toast-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 6px 18px rgba(255, 20, 147, 0.35);
    margin-top: 2px;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.toast-message {
    font-size: 1.01rem;
    line-height: 1.65;
    color: #1e2937;
    margin: 0 0 14px 0;
    font-weight: 500;
}

/* Action Button */
.toast-action-btn {
    background: linear-gradient(135deg, #FF1493, #FF69B4);
    color: white;
    border: none;
    padding: 9px 26px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 16px rgba(255, 20, 147, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toast-action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(255, 20, 147, 0.45);
    background: linear-gradient(135deg, #e6007a, #FF1493);
}

/* Close Button */
.toast-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f8fafc;
    color: #94a3b8;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.toast-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3.5px;
    background: linear-gradient(to right, #FF1493, #FF69B4);
    width: 100%;
    animation: toastProgress linear forwards;
    border-radius: 0 0 22px 22px;
}

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

/* ====================== RESPONSIVE ====================== */
@media (max-width: 480px) {
    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
        padding-right: 0;
    }
    
    .toast {
        padding: 16px 18px;
        gap: 14px;
    }
    
    .alert-dialog,
    .confirm-dialog {
        max-width: 94%;
        margin: 12px;
        border-radius: 22px;
    }
    
    .alert-icon {
        width: 92px;
        height: 92px;
        font-size: 3.6rem;
        margin: 24px auto 8px;
    }
    
    .confirm-icon {
        width: 82px;
        height: 82px;
        font-size: 3.2rem;
        margin: 22px auto 6px;
    }
    
    .alert-body,
    .confirm-body {
        padding: 0 22px 6px;
    }
    
    .alert-message,
    .confirm-message {
        font-size: 1.08rem;
    }
    
    .alert-footer,
    .confirm-footer {
        padding: 18px 22px 26px;
        gap: 10px;
    }
    
    .btn-alert,
    .btn-confirm {
        padding: 11px 26px;
        font-size: 0.95rem;
        min-width: 115px;
    }
}