/* ======================================================================
   NZT GLOBAL FEEDBACK
   Toast compacto, no invasivo y reutilizable.
   ====================================================================== */

.nzt-feedback-region {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 32000;
    width: min(390px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.nzt-feedback-toast {
    --nzt-feedback-accent: #22bfd4;
    --nzt-feedback-accent-soft: rgba(34, 191, 212, 0.12);
    --nzt-feedback-duration: 3200ms;

    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 13px 12px 13px 13px;
    overflow: hidden;
    border: 1px solid rgba(15, 134, 158, 0.18);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.97);
    color: #10212f;
    box-shadow: 0 18px 44px rgba(39, 90, 111, 0.20);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nzt-feedback-toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--nzt-feedback-accent);
}

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

.nzt-feedback-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
}

.nzt-feedback-success {
    --nzt-feedback-accent: #15966a;
    --nzt-feedback-accent-soft: rgba(21, 150, 106, 0.11);
}

.nzt-feedback-error {
    --nzt-feedback-accent: #d54859;
    --nzt-feedback-accent-soft: rgba(213, 72, 89, 0.11);
}

.nzt-feedback-warning {
    --nzt-feedback-accent: #b98916;
    --nzt-feedback-accent-soft: rgba(185, 137, 22, 0.12);
}

.nzt-feedback-info {
    --nzt-feedback-accent: #22bfd4;
    --nzt-feedback-accent-soft: rgba(34, 191, 212, 0.11);
}

.nzt-feedback-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--nzt-feedback-accent) 38%, transparent);
    border-radius: 14px;
    background: var(--nzt-feedback-accent-soft);
    color: var(--nzt-feedback-accent);
    font-size: 20px;
    line-height: 1;
}

.nzt-feedback-copy {
    min-width: 0;
}

.nzt-feedback-title {
    display: block;
    margin: 0 0 4px;
    color: #10212f;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.15px;
}

.nzt-feedback-message {
    margin: 0;
    color: #60717f;
    font-size: 12.5px;
    line-height: 1.42;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.nzt-feedback-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #7f8b96;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.16s ease, color 0.16s ease;
}

.nzt-feedback-close:hover,
.nzt-feedback-close:focus-visible {
    background: rgba(34, 191, 212, 0.09);
    color: #0c94aa;
    outline: none;
}

.nzt-feedback-progress {
    position: absolute;
    left: 4px;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--nzt-feedback-accent);
    transform-origin: left center;
    animation: nztFeedbackProgress var(--nzt-feedback-duration) linear forwards;
    opacity: 0.72;
}

.nzt-feedback-toast.is-paused .nzt-feedback-progress {
    animation-play-state: paused;
}

@keyframes nztFeedbackProgress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

html.nztm-dark .nzt-feedback-toast,
body.nztm-dark .nzt-feedback-toast {
    border-color: rgba(70, 215, 237, 0.22);
    background: rgba(7, 45, 61, 0.97);
    color: #f7fbfd;
    box-shadow: 0 20px 48px rgba(0, 17, 28, 0.46);
}

html.nztm-dark .nzt-feedback-title,
body.nztm-dark .nzt-feedback-title {
    color: #f7fbfd;
}

html.nztm-dark .nzt-feedback-message,
body.nztm-dark .nzt-feedback-message {
    color: #b8c8d2;
}

html.nztm-dark .nzt-feedback-close,
body.nztm-dark .nzt-feedback-close {
    color: #a5b8c5;
}

html.nztm-dark .nzt-feedback-close:hover,
html.nztm-dark .nzt-feedback-close:focus-visible,
body.nztm-dark .nzt-feedback-close:hover,
body.nztm-dark .nzt-feedback-close:focus-visible {
    background: rgba(50, 217, 236, 0.12);
    color: #83ecf8;
}

@media (max-width: 640px) {
    .nzt-feedback-region {
        top: 50%;
        left: 50%;
        right: auto;
        width: min(390px, calc(100vw - 24px));
        transform: translate(-50%, -50%);
    }

    .nzt-feedback-toast {
        width: 100%;
        min-height: 72px;
        grid-template-columns: 40px minmax(0, 1fr) 28px;
        padding: 12px 10px 12px 12px;
        border-radius: 17px;
    }

    .nzt-feedback-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nzt-feedback-toast {
        transition: none;
    }

    .nzt-feedback-progress {
        animation: none;
    }
}
