.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
}

.toast-container.top-right {
    top: 20px;
    right: 20px;
}

.toast-container.top-left {
    top: 20px;
    left: 20px;
}

.toast-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-item {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-item.removing {
    animation: slideOut 0.3s ease-in-out forwards;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.toast-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.toast-item.success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-item.success .toast-icon svg {
    color: #ffffff;
}

.toast-item.success .toast-progress {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.toast-item.error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-item.error .toast-icon svg {
    color: #ffffff;
}

.toast-item.error .toast-progress {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.toast-item.warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-item.warning .toast-icon svg {
    color: #ffffff;
}

.toast-item.warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.toast-item.info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.toast-item.info .toast-icon svg {
    color: #ffffff;
}

.toast-item.info .toast-progress {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.toast-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: #9ca3af;
    padding: 0;
    margin-left: auto;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.toast-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: progress 4s linear forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 12px;
        padding: 16px 20px;
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@media (max-width: 576px) {
    .toast-container {
        width: 100%;
        left: 0 !important;
        right: 0 !important;
        padding: 0 16px;
    }

    .toast-container.top-right,
    .toast-container.top-left {
        top: 16px;
    }

    .toast-container.bottom-right,
    .toast-container.bottom-left {
        bottom: 16px;
    }

    .toast-item {
        min-width: 100%;
        max-width: 100%;
    }
}

.toast-container.top-left .toast-item,
.toast-container.bottom-left .toast-item {
    animation: slideInLeft 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.top-left .toast-item.removing,
.toast-container.bottom-left .toast-item.removing {
    animation: slideOutLeft 0.3s ease-in-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 12px;
        padding: 16px 20px;
    }
    to {
        opacity: 0;
        transform: translateX(-100%) scale(0.95);
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
    }
}

