:root {
    --toast-width: min(400px, 90vw);
    --toast-bg: var(--color-white);
    --toast-text: var(--color-2);

    --toast-success: var(--color-green);
    --toast-error: var(--color-red);
    --toast-warning: var(--color-yellow);
    --toast-info: var(--color-blue);

    --toast-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Container */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

/* Toast */
.toast {
    width: var(--toast-width);
    background: var(--toast-bg);
    border-radius: 8px;
    box-shadow: var(--toast-shadow);
    display: flex;
    align-items: center;
    text-align: center;
    padding: 15px 20px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: slideInTop 0.4s ease forwards;
    backdrop-filter: blur(10px);
}


/* Icon */
.toast-icon {
    margin-right: 15px;
    font-size: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--toast-success); }
.toast.error   .toast-icon { color: var(--toast-error); }
.toast.warning .toast-icon { color: var(--toast-warning); }
.toast.info    .toast-icon { color: var(--toast-info); }

/* Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 16px;
}

.toast-message {
    font-size: 14px;
    color: var(--color-grey);
    margin: 0;
}

/* Close Button */
.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--color-8);
    margin-left: 10px;
}

.toast-close:hover {
    color: var(--color-2);
}

/* Progress */
.progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    width: 100%;
}

.toast.success .progress-bar { background: var(--toast-success); }
.toast.error   .progress-bar { background: var(--toast-error); }
.toast.warning .progress-bar { background: var(--toast-warning); }
.toast.info    .progress-bar { background: var(--toast-info); }

/* Animations */
@keyframes slideInTop {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.9); }
}

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

.toast:hover .progress-bar {
    animation-play-state: paused;
}
