/**
 * Toast Notification System
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
}

/* Toast Item */
.toast-container .toast {
    min-width: 360px;
    max-width: 420px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 18px 22px;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 14px;
    opacity: 0;
    transform: translateX(450px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Toast Show Animation */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast Hide Animation */
.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Toast Types */
.toast.toast-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-left: 4px solid #22c55e;
}

.toast.toast-success .toast-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.toast.toast-error {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-left: 4px solid #ef4444;
}

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

.toast.toast-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border-left: 4px solid #f59e0b;
}

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

.toast.toast-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border-left: 4px solid #3b82f6;
}

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

/* Toast Icon */
.toast-container .toast .toast-icon {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #DC4D28 0%, #b83d1f 100%);
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(220, 77, 40, 0.25);
    align-self: center !important;
    flex-shrink: 0 !important;
}

.toast-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

/* Toast Content */
.toast-container .toast .toast-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    align-self: center !important;
    min-width: 0;
    flex: 1 !important;
}

.toast-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

/* Toast Close Button */
.toast-container .toast .toast-close {
    width: 32px !important;
    height: 32px !important;
    background: rgba(0, 0, 0, 0.03);
    border: none;
    padding: 0 !important;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px;
    align-self: flex-start !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #4b5563;
    transform: scale(1.05);
}

.toast-close:active {
    transform: scale(0.95);
}

.toast-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #DC4D28 0%, #ff6b45 100%);
    border-radius: 0 0 8px 8px;
    animation: toast-progress 5s linear forwards;
    box-shadow: 0 -1px 3px rgba(220, 77, 40, 0.3);
    grid-column: 1 / -1;
}

.toast.toast-success .toast-progress {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 -1px 3px rgba(34, 197, 94, 0.3);
}

.toast.toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 -1px 3px rgba(239, 68, 68, 0.3);
}

.toast.toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 -1px 3px rgba(245, 158, 11, 0.3);
}

.toast.toast-info .toast-progress {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 -1px 3px rgba(59, 130, 246, 0.3);
}

@keyframes toast-progress {
    from {
        width: 100%;
        opacity: 1;
    }
    to {
        width: 0%;
        opacity: 0.7;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 20px;
        right: 0;
        left: 0;
        gap: 12px;
        align-items: center;
    }

    .toast {
        min-width: auto;
        max-width: calc(100% - 32px);
        width: auto;
        padding: 16px 18px;
        border-radius: 6px;
    }

    .toast-icon {
        width: 36px;
        height: 36px;
    }

    .toast-icon svg {
        width: 20px;
        height: 20px;
    }

    .toast-title {
        font-size: 15px;
    }

    .toast-message {
        font-size: 13px;
    }

    .toast-close {
        width: 28px;
        height: 28px;
    }

    .toast-close svg {
        width: 14px;
        height: 14px;
    }
}

/* Hover effects for desktop */
@media (min-width: 769px) {
    .toast:hover {
        transform: translateX(-4px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
    }
}
