/* ==========================================
   FBIS StockFlow - Toast Notifications CSS
   Modern, Glassmorphic & Animated Toast System
   Position: Top Right (Below Header Navbar)
   ========================================== */

@font-face {
    font-family: 'KantumruyPro';
    src: url('/public/assets/fonts/KantumruyPro-Regular.otf') format('opentype');
}

.toast-container-custom {
    position: fixed;
    top: 95px !important;
    right: 24px !important;
    left: auto;
    transform: none;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
    font-family: 'KantumruyPro', system-ui, -apple-system, sans-serif;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 10px 30px -5px rgba(0, 32, 96, 0.14),
        0 4px 12px -2px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.85);
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    width: 100%;
}

.toast-notification.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Icon Wrapper */
.toast-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 1.25rem;
}

/* Toast Content */
.toast-body-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 3px;
    color: #0f172a;
}

.toast-message {
    font-size: 0.86rem;
    color: #475569;
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
}

/* Toast Close Button */
.toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: -2px;
    margin-right: -4px;
}

.toast-close-btn:hover {
    color: #334155;
    background: rgba(0, 0, 0, 0.05);
}

/* Toast Progress Bar */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
}

/* Variants */
/* Success */
.toast-notification.toast-success {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.96) 0%, rgba(220, 252, 231, 0.96) 100%);
    border: 1px solid rgba(167, 243, 208, 0.9);
    border-left: 5px solid #10b981;
}

.toast-notification.toast-success .toast-title {
    color: #065f46;
}

.toast-notification.toast-success .toast-message {
    color: #047857;
}

.toast-notification.toast-success .toast-icon-wrapper {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.toast-notification.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Error / Danger */
.toast-notification.toast-error,
.toast-notification.toast-danger {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.96) 0%, rgba(254, 226, 226, 0.96) 100%);
    border: 1px solid rgba(254, 202, 202, 0.9);
    border-left: 5px solid #ef4444;
}

.toast-notification.toast-error .toast-title,
.toast-notification.toast-danger .toast-title {
    color: #991b1b;
}

.toast-notification.toast-error .toast-message,
.toast-notification.toast-danger .toast-message {
    color: #b91c1c;
}

.toast-notification.toast-error .toast-icon-wrapper,
.toast-notification.toast-danger .toast-icon-wrapper {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.toast-notification.toast-error .toast-progress-bar,
.toast-notification.toast-danger .toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Warning */
.toast-notification.toast-warning {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.96) 100%);
    border: 1px solid rgba(253, 230, 138, 0.9);
    border-left: 5px solid #f59e0b;
}

.toast-notification.toast-warning .toast-title {
    color: #92400e;
}

.toast-notification.toast-warning .toast-message {
    color: #b45309;
}

.toast-notification.toast-warning .toast-icon-wrapper {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.toast-notification.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Info */
.toast-notification.toast-info {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(219, 234, 254, 0.96) 100%);
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-left: 5px solid #3b82f6;
}

.toast-notification.toast-info .toast-title {
    color: #1e40af;
}

.toast-notification.toast-info .toast-message {
    color: #1d4ed8;
}

.toast-notification.toast-info .toast-icon-wrapper {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.toast-notification.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Keyframe animations for Progress */
@keyframes toastProgressAnim {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}