/* ============================================================================
   RESPONSE POPUP — styled for Kintech (site design tokens, light/dark aware).
   Stacking: above the menu (70) and header (80), below the preloader.
   ============================================================================ */

.response-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 1rem;
    align-items: center;
    background: color-mix(in oklab, var(--k-indigo) 55%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.response-popup.is-visible {
    display: flex;
    animation: response-popup-fade .35s var(--ease-out) both;
}

.response-popup-content {
    position: relative;
    inline-size: 100%;
    max-inline-size: 34rem;
    margin: auto;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    padding-right: 4rem;
    border-radius: calc(var(--radius) * 1.1);
    border: 1px solid var(--glass-edge);
    background: var(--surface-solid);
    box-shadow: inset 0 1px 0 var(--glass-shine), var(--shadow-soft);
    color: var(--ink);
    font-family: var(--font-sans);
    animation: response-popup-in .55s var(--ease-spring) both;
    overflow: hidden;
}

/* Brand stripe on top: fire for success, magenta→orange for errors */
.response-popup-content::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    block-size: 4px;
    background: var(--grad-fire);
}
.response-popup-content.is-error::before { background: var(--grad-brand); }

.response-popup-content b {
    display: block;
    margin-bottom: .6rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: var(--fs-lg);
    line-height: 1.1;
    color: var(--accent);
}

.response-popup-content p {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--ink-soft);
}

.response-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    inline-size: 2.4rem;
    block-size: 2.4rem;
    border-radius: 50%;
    border: 1px solid var(--ink-mute);
    color: var(--ink);
    cursor: pointer;
    transition: background-color .3s, border-color .3s, color .3s, rotate .45s var(--ease-spring);
}

.response-popup-close svg {
    inline-size: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.response-popup-close:hover,
.response-popup-close:focus-visible {
    background: var(--k-amber);
    border-color: var(--k-amber);
    color: var(--k-indigo);
    rotate: 90deg;
}

.response-popup-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@keyframes response-popup-fade { from { opacity: 0; } }
@keyframes response-popup-in   { from { opacity: 0; translate: 0 1.5rem; scale: .96; } }

@media (prefers-reduced-motion: reduce) {
    .response-popup.is-visible,
    .response-popup-content { animation: none; }
    .response-popup-close { transition: none; }
}
