/**
 * Toast Notifications
 *
 * @package SpeedNadruki
 */

/* Container - fixed bottom right */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

/* Single toast */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid var(--navy);
}

.toast--visible {
    transform: translateX(0);
    opacity: 1;
}

/* Toast types */
.toast--success {
    border-left-color: var(--status-success);
}

.toast--success .toast__icon {
    color: var(--status-success);
}

.toast--error {
    border-left-color: var(--status-error);
}

.toast--error .toast__icon {
    color: var(--status-error);
}

.toast--warning {
    border-left-color: var(--status-warning);
}

.toast--warning .toast__icon {
    color: var(--status-warning);
}

.toast--info {
    border-left-color: var(--mint);
}

.toast--info .toast__icon {
    color: var(--mint);
}

/* Icon */
.toast__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.toast__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Message */
.toast__message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.toast__message a {
    color: var(--mint-hover);
    font-weight: 600;
    text-decoration: underline;
}

.toast__message a:hover {
    color: var(--navy);
}

/* Close button */
.toast__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: -4px -8px -4px 4px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast__close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

/* Error list in toast */
.toast-error-list {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: disc;
}

.toast-error-list li {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* Hide original WooCommerce notices (we use toasts) */
.woocommerce-NoticeGroup,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info:not(.cart-empty) {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    #toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .toast {
        padding: 14px 16px;
    }
}
