/**
 * Perfect Store — Notificações enterprise (estilo banco)
 * Banner full-width deslizando de cima para baixo.
 */

#ps-enterprise-toasts {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0;
    pointer-events: none;
}

.ps-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 14px 48px 14px 16px;
    font-family: "Inter", var(--base-font-family, sans-serif);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    transform: translateY(-110%);
    opacity: 0;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease;
}

.ps-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.ps-toast.is-leaving {
    transform: translateY(-110%);
    opacity: 0;
    transition-duration: 0.28s;
}

.ps-toast__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.ps-toast__body {
    flex: 1;
    min-width: 0;
}

.ps-toast__title {
    display: block;
    margin-bottom: 1px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.88;
}

.ps-toast__message {
    display: block;
    word-break: break-word;
}

.ps-toast__close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ps-toast__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.ps-toast--error {
    background: linear-gradient(180deg, #c81e1e 0%, #b42318 100%);
    border-bottom: 3px solid #7f1d1d;
}

.ps-toast--success {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    border-bottom: 3px solid #065f46;
}

.ps-toast--warning {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
    border-bottom: 3px solid #92400e;
}

.ps-toast--info {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-bottom: 3px solid #1e3a8a;
}

/* Session flash — banner fixo no topo */
.ps-flash-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 14px 48px 14px 16px;
    font-family: "Inter", var(--base-font-family, sans-serif);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    animation: psFlashSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ps-flash-banner.is-leaving {
    animation: psFlashSlideOut 0.3s ease forwards;
}

.ps-flash-banner--error {
    background: linear-gradient(180deg, #c81e1e 0%, #b42318 100%);
    border-bottom: 3px solid #7f1d1d;
}

.ps-flash-banner--success {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    border-bottom: 3px solid #065f46;
}

.ps-flash-banner__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 800;
}

.ps-flash-banner__close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.ps-flash-banner__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

body.has-ps-flash {
    padding-top: 52px;
}

@keyframes psFlashSlideIn {
    from {
        transform: translateY(-110%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes psFlashSlideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-110%);
        opacity: 0;
    }
}

@media (min-width: 768px) {
    .ps-toast,
    .ps-flash-banner {
        padding-left: 24px;
        padding-right: 56px;
        font-size: 14px;
    }
}
