/* Toast Notification System - Chiroyli va Zamonaviy */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 300px;
    max-width: 380px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 3px solid;
    position: relative;
    overflow: hidden;
}

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

.toast-notification.hide {
    transform: translateX(450px);
    opacity: 0;
}

/* Dark Theme */
[data-theme="dark"] .toast-notification {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Toast Types */
.toast-notification.success {
    border-left-color: #10b981;
}

.toast-notification.error {
    border-left-color: #ef4444;
}

.toast-notification.warning {
    border-left-color: #f59e0b;
}

.toast-notification.info {
    border-left-color: #3b82f6;
}

/* Toast Icon */
.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconPop {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.toast-notification.success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.toast-notification.error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-notification.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast-notification.info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    line-height: 1.3;
}

[data-theme="dark"] .toast-title {
    color: #f3f4f6;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

[data-theme="dark"] .toast-message {
    color: #9ca3af;
}

/* Toast Close Button */
.toast-close {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: #6b7280;
    font-size: 16px;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

[data-theme="dark"] .toast-close {
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 0 0 0 12px;
    animation: progressBar 4s linear forwards;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast-notification {
        min-width: auto;
        max-width: 100%;
        padding: 12px 16px;
    }
    
    .toast-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

/* Animation for multiple toasts */
.toast-notification:nth-child(1) {
    animation-delay: 0s;
}

.toast-notification:nth-child(2) {
    animation-delay: 0.1s;
}

.toast-notification:nth-child(3) {
    animation-delay: 0.2s;
}
