/* Toast — Fluid: 1px ≈ 0.1rem. Màu: --pcu-toast-* (tab Giao diện CMS). */
#sgs-toast-container {
    position: fixed;
    top: 11.5rem;
    right: 5rem;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.sgs-toast {
    max-width: 50rem;
    padding: 0.7rem 2rem;
    background-color: var(--pcu-toast-bg, #f7f1e8);
    box-shadow: 0 0.4rem 1.2rem var(--pcu-toast-shadow, rgba(0, 0, 0, 0.15));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    opacity: 0;
    transform: translateX(40rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    min-height: 4.6rem;
    border-radius: 1.2rem;
}

.sgs-toast.sgs-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.sgs-toast-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.sgs-toast-icon {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
}

.sgs-toast-message {
    flex: 1;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--pcu-toast-message, #333);
}

.sgs-toast-close {
    background: none;
    border: none;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--pcu-toast-close, #999);
    cursor: pointer;
    padding: 0;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
    margin: 0;
    min-height: unset;
    display: none;
}

.sgs-toast-close:hover {
    color: var(--pcu-toast-close-hover, #333);
}

/* Toast Types */
.sgs-toast-success {
    border-left-color: var(--pcu-toast-success-accent, #28a745);
    background-color: var(--pcu-toast-success-bg, #f8fff9);
}

.sgs-toast-success .sgs-toast-icon {
    color: var(--pcu-toast-success-accent, #28a745);
}

.sgs-toast-error {
    border-left-color: var(--pcu-toast-error-accent, #dc3545);
    background-color: var(--pcu-toast-error-bg, #fff5f5);
}

.sgs-toast-error .sgs-toast-icon {
    color: var(--pcu-toast-error-accent, #dc3545);
}

.sgs-toast-info {
    border-left-color: var(--pcu-toast-info-accent, #17a2b8);
    background-color: var(--pcu-toast-info-bg, #f0f9ff);
}

.sgs-toast-info .sgs-toast-icon {
    color: var(--pcu-toast-info-accent, #17a2b8);
}

.sgs-toast-warning {
    border-left-color: var(--pcu-toast-warning-accent, #ffc107);
    background-color: var(--pcu-toast-warning-bg, #fffbf0);
}

.sgs-toast-warning .sgs-toast-icon {
    color: var(--pcu-toast-warning-accent, #ffc107);
}

/* Responsive */
@media (max-width: 76.8rem) {
    #sgs-toast-container {
        top: 9.5rem;
        right: 1.5rem;
        left: 1.5rem;
    }

    .sgs-toast {
        min-width: auto;
        max-width: 100%;
        min-height: 4.2rem;
    }

    .sgs-toast-content {
        justify-content: center;
    }

    .sgs-toast-message {
        flex: unset;
    }
}
