@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --toast-success: #10b981;
    --toast-error: #ef4444;
    --toast-warning: #f59e0b;
    --toast-info: #3b82f6;
    --toast-bg: rgba(255, 255, 255, 0.85);
    --toast-text: #1f2937;
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    min-width: 320px;
    max-width: 450px;
    background: var(--toast-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

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

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

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: white;
}

.toast-item.success .toast-icon {
    background: var(--toast-success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.toast-item.error .toast-icon {
    background: var(--toast-error);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.toast-item.warning .toast-icon {
    background: var(--toast-warning);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.toast-item.info .toast-icon {
    background: var(--toast-info);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    color: var(--toast-text);
}

.toast-message {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
}

.toast-close {
    padding: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    font-size: 18px;
    color: var(--toast-text);
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
}

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

.toast-item.success .toast-progress-bar {
    background: var(--toast-success);
}

.toast-item.error .toast-progress-bar {
    background: var(--toast-error);
}

.toast-item.warning .toast-progress-bar {
    background: var(--toast-warning);
}

.toast-item.info .toast-progress-bar {
    background: var(--toast-info);
}

@keyframes progress-animation {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* Dark mode support if the site has it */
@media (prefers-color-scheme: dark) {
    .toast-item {
        background: rgba(31, 41, 55, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.1);
        --toast-text: #f3f4f6;
    }

    .toast-message {
        color: #9ca3af;
    }
}