/**
 * DesineXpress - Ultra-Modern Light Theme Popup Notification System (Toasts)
 * Executive Light Aesthetics, Spring Physics, Progress Countdown & Responsive Scaling
 */

/* Toast Container (Desktop & Mobile: Top Right, Compact & Non-Intrusive) */
#dx-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 330px;
    width: auto;
    align-items: flex-end;
}

/* Individual Toast Popup Card - Executive White Light Theme (Small & Short) */
.dx-toast-popup {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    width: auto;
    min-width: 240px;
    max-width: 310px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    box-shadow: 
        0 12px 30px -6px rgba(15, 23, 42, 0.12),
        0 4px 12px -2px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 9px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-sizing: border-box;
    font-family: var(--dx-font, 'Plus Jakarta Sans', system-ui, sans-serif);
    animation: dxToastSlideRightToLeft 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
    cursor: default;
}

.dx-toast-popup:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 16px 36px -6px rgba(15, 23, 42, 0.16),
        0 4px 14px -2px rgba(15, 23, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dx-toast-popup.dx-toast-exit {
    animation: dxToastSlideRightToLeftExit 0.26s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

/* Icon Badge - Compact */
.dx-toast-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    border: 1px solid transparent;
    transition: transform 0.2s ease;
}

.dx-toast-popup:hover .dx-toast-icon-badge {
    transform: scale(1.08) rotate(3deg);
}

/* Content Text Area */
.dx-toast-content {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.dx-toast-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: #0f172a;
    margin-bottom: 1px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.dx-toast-message {
    font-weight: 500;
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.35;
    word-break: break-word;
}

/* Close 'X' Button - Compact */
.dx-toast-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    font-size: 12px;
    margin-top: 1px;
}

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

/* Countdown Progress Bar */
.dx-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2.5px;
    width: 100%;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.dx-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: dxToastProgress linear forwards;
}

.dx-toast-popup:hover .dx-toast-progress-bar {
    animation-play-state: paused !important;
}

/* ==========================================================================
   THEME PALETTES (All A to Z Notification Types)
   ========================================================================== */

/* 1. Success */
.dx-toast-success .dx-toast-icon-badge {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border-color: #a7f3d0;
}
.dx-toast-success .dx-toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* 2. Error / Danger */
.dx-toast-error .dx-toast-icon-badge,
.dx-toast-danger .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border-color: #fecaca;
}
.dx-toast-error .dx-toast-progress-bar,
.dx-toast-danger .dx-toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* 3. Warning */
.dx-toast-warning .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border-color: #fde68a;
}
.dx-toast-warning .dx-toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* 4. Info */
.dx-toast-info .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    border-color: #bae6fd;
}
.dx-toast-info .dx-toast-progress-bar {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

/* 5. Cart (Add to Cart) */
.dx-toast-cart .dx-toast-icon-badge,
.dx-toast-cart-add .dx-toast-icon-badge {
    background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
    color: #0d9488;
    border-color: #99f6e4;
}
.dx-toast-cart .dx-toast-progress-bar,
.dx-toast-cart-add .dx-toast-progress-bar {
    background: linear-gradient(90deg, #14b8a6, #0d9488);
}

/* 6. Cart Remove */
.dx-toast-cart-remove .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    color: #e11d48;
    border-color: #fecdd3;
}
.dx-toast-cart-remove .dx-toast-progress-bar {
    background: linear-gradient(90deg, #f43f5e, #e11d48);
}

/* 7. Wishlist (Add to Wishlist) */
.dx-toast-wishlist .dx-toast-icon-badge,
.dx-toast-wishlist-add .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    color: #db2777;
    border-color: #fbcfe8;
}
.dx-toast-wishlist .dx-toast-progress-bar,
.dx-toast-wishlist-add .dx-toast-progress-bar {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

/* 8. Wishlist Remove */
.dx-toast-wishlist-remove .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #64748b;
    border-color: #e2e8f0;
}
.dx-toast-wishlist-remove .dx-toast-progress-bar {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

/* 9. Checkout & Payment */
.dx-toast-checkout .dx-toast-icon-badge,
.dx-toast-payment .dx-toast-icon-badge {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    border-color: #c7d2fe;
}
.dx-toast-checkout .dx-toast-progress-bar,
.dx-toast-payment .dx-toast-progress-bar {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
}

/* 10. Mail Send / Contact */
.dx-toast-mail .dx-toast-icon-badge,
.dx-toast-mail-send .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border-color: #bbf7d0;
}
.dx-toast-mail .dx-toast-progress-bar,
.dx-toast-mail-send .dx-toast-progress-bar {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* 11. Submit (Form / Action Submit) */
.dx-toast-submit .dx-toast-icon-badge {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: #7e22ce;
    border-color: #e9d5ff;
}
.dx-toast-submit .dx-toast-progress-bar {
    background: linear-gradient(90deg, #a855f7, #7e22ce);
}

/* 12. Login Success */
.dx-toast-login .dx-toast-icon-badge,
.dx-toast-login-success .dx-toast-icon-badge {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.dx-toast-login .dx-toast-progress-bar,
.dx-toast-login-success .dx-toast-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* 13. Logout Success */
.dx-toast-logout .dx-toast-icon-badge,
.dx-toast-logout-success .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155;
    border-color: #cbd5e1;
}
.dx-toast-logout .dx-toast-progress-bar,
.dx-toast-logout-success .dx-toast-progress-bar {
    background: linear-gradient(90deg, #64748b, #334155);
}

/* 14. Delete / Trash */
.dx-toast-delete .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
    color: #be123c;
    border-color: #fecdd3;
}
.dx-toast-delete .dx-toast-progress-bar {
    background: linear-gradient(90deg, #e11d48, #be123c);
}

/* 15. Remove */
.dx-toast-remove .dx-toast-icon-badge {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    border-color: #fed7aa;
}
.dx-toast-remove .dx-toast-progress-bar {
    background: linear-gradient(90deg, #f97316, #c2410c);
}

/* 16. Copy to Clipboard */
.dx-toast-copy .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    color: #0f766e;
    border-color: #99f6e4;
}
.dx-toast-copy .dx-toast-progress-bar {
    background: linear-gradient(90deg, #14b8a6, #0f766e);
}

/* 17. Download */
.dx-toast-download .dx-toast-icon-badge {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #15803d;
    border-color: #bbf7d0;
}
.dx-toast-download .dx-toast-progress-bar {
    background: linear-gradient(90deg, #22c55e, #15803d);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES (Right-To-Left Animation System on ALL Devices)
   ========================================================================== */
@keyframes dxToastSlideRightToLeft {
    0% {
        opacity: 0;
        transform: translate3d(125%, 0, 0);
    }
    75% {
        opacity: 1;
        transform: translate3d(-6px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes dxToastSlideRightToLeftExit {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        max-height: 85px;
        margin-bottom: 0;
    }
    30% {
        opacity: 0.9;
        transform: translate3d(-6px, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(130%, 0, 0);
        max-height: 0;
        margin-bottom: -10px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes dxToastProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (Compact & Right-To-Left System Maintained)
   ========================================================================== */
@media (max-width: 576px) {
    #dx-toast-container {
        top: 14px;
        right: 12px;
        left: auto;
        width: auto;
        max-width: calc(100vw - 24px);
        align-items: flex-end;
    }
    
    .dx-toast-popup {
        width: auto;
        min-width: 220px;
        max-width: 290px;
        padding: 8px 11px;
        border-radius: 11px;
        gap: 8px;
        animation: dxToastSlideRightToLeft 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .dx-toast-popup.dx-toast-exit {
        animation: dxToastSlideRightToLeftExit 0.24s cubic-bezier(0.4, 0, 1, 1) forwards !important;
    }
    
    .dx-toast-icon-badge {
        width: 30px;
        height: 30px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .dx-toast-title {
        font-size: 0.79rem;
    }
    
    .dx-toast-message {
        font-size: 0.72rem;
    }
}

/* ==========================================================================
   EXECUTIVE WEBPAGE CONFIRMATION MODAL (dxConfirm)
   ========================================================================== */
.dx-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s ease;
    box-sizing: border-box;
}

.dx-confirm-backdrop.dx-confirm-visible {
    opacity: 1;
}

.dx-confirm-card {
    background: #ffffff;
    width: 100%;
    max-width: 410px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 
        0 24px 50px -12px rgba(15, 23, 42, 0.25),
        0 4px 16px -2px rgba(15, 23, 42, 0.08);
    padding: 26px 24px;
    text-align: center;
    position: relative;
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    font-family: var(--dx-font, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.dx-confirm-backdrop.dx-confirm-visible .dx-confirm-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.dx-confirm-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.dx-confirm-icon-wrap.theme-danger,
.dx-confirm-icon-wrap.theme-cart {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #ef4444;
    border: 1px solid #fecaca;
}

.dx-confirm-icon-wrap.theme-wishlist {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    color: #db2777;
    border: 1px solid #fbcfe8;
}

.dx-confirm-icon-wrap.theme-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border: 1px solid #fde68a;
}

.dx-confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.dx-confirm-message {
    font-size: 0.90rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
    padding: 0 4px;
}

.dx-confirm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.dx-confirm-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

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

.dx-confirm-btn-confirm {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.dx-confirm-btn-confirm:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.dx-confirm-btn-confirm.theme-wishlist {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    box-shadow: 0 4px 14px rgba(219, 39, 119, 0.35);
}

.dx-confirm-btn-confirm.theme-wishlist:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    box-shadow: 0 6px 18px rgba(219, 39, 119, 0.45);
}

.dx-confirm-btn-confirm.theme-cart {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.dx-confirm-btn-confirm.theme-cart:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.dx-confirm-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f8fafc;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

@media (max-width: 576px) {
    .dx-confirm-card {
        padding: 22px 18px;
        border-radius: 18px;
        max-width: calc(100vw - 32px);
    }
    .dx-confirm-icon-wrap {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-bottom: 12px;
    }
    .dx-confirm-title {
        font-size: 1.05rem;
    }
    .dx-confirm-message {
        font-size: 0.85rem;
        margin-bottom: 18px;
    }
    .dx-confirm-btn {
        padding: 9px 12px;
        font-size: 0.84rem;
    }
}


