/* ========== TOAST ========== */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    min-width: 320px;
    max-width: 450px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border-hover);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transform: translateX(110%);
    animation: slideInRight 0.4s var(--transition-bounce) forwards;
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

/* Varyant 1: Success */
.toast-success {
    border-left: 3px solid var(--success);
}

.toast-success::before {
    background: var(--success);
}

.toast-success .toast-icon i {
    color: var(--success);
}

/* Varyant 2: Error */
.toast-error {
    border-left: 3px solid var(--error);
}

.toast-error::before {
    background: var(--error);
}

.toast-error .toast-icon i {
    color: var(--error);
}

/* Varyant 3: Warning */
.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast-warning::before {
    background: var(--warning);
}

.toast-warning .toast-icon i {
    color: var(--warning);
}

/* Varyant 4: Info */
.toast-info {
    border-left: 3px solid var(--atlantic-light);
}

.toast-info::before {
    background: var(--atlantic-light);
}

.toast-info .toast-icon i {
    color: var(--atlantic-light);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-pure);
    margin-bottom: 0.15rem;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-pure);
}

/* Exit animation */
.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(110%);
    }
}
