/**
 * Chandravanshi Group - Premium Glassmorphism Toaster Notification System
 */

/* Container for Toasts */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 32px);
}

/* Individual Toast Card */
.toast-item {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

/* Toast Icon Wrapper */
.toast-icon-wrap {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Success Type (Emerald) */
.toast-item.toast-success {
    border-color: rgba(16, 185, 129, 0.3);
}
.toast-item.toast-success .toast-icon-wrap {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}
.toast-item.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Error Type (Crimson) */
.toast-item.toast-error {
    border-color: rgba(239, 68, 68, 0.35);
}
.toast-item.toast-error .toast-icon-wrap {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}
.toast-item.toast-error .toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Warning Type (Amber Gold) */
.toast-item.toast-warning {
    border-color: rgba(245, 158, 11, 0.35);
}
.toast-item.toast-warning .toast-icon-wrap {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}
.toast-item.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Info Type (Cyan / Sapphire) */
.toast-item.toast-info {
    border-color: rgba(14, 165, 233, 0.35);
}
.toast-item.toast-info .toast-icon-wrap {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}
.toast-item.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

/* Toast Text Body */
.toast-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.toast-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
    word-break: break-word;
}

/* Close Button */
.toast-close-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.2s ease;
}

.toast-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Countdown Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 640px) {
    #toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}
