/**
 * Popup component — replaces the legacy dialog plugin.
 *
 * Kit dark language, amber accent. Sizes are px on purpose: these pages derive
 * their rem base from the viewport (1rem ≈ 56px in the desktop frame).
 */
.gv-pop-root {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gv-pop-root.is-blocking { pointer-events: auto; }

.gv-pop-scrim {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 10, 0.64);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.gv-pop-root.is-in .gv-pop-scrim { opacity: 1; }

/* ---------------------------------------------------------------- card */
.gv-pop {
    position: relative;
    width: min(100%, 330px);
    background: #1b1e20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
    padding: 26px 22px 20px;
    text-align: center;
    color: #fff;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    pointer-events: auto;
}

.gv-pop-root.is-in .gv-pop { opacity: 1; transform: translateY(0) scale(1); }
.gv-pop-root.is-out .gv-pop { opacity: 0; transform: translateY(6px) scale(0.97); }

/* ---------------------------------------------------------------- icon */
.gv-pop-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 173, 29, 0.14);
}

.gv-pop-icon svg { width: 28px; height: 28px; fill: none; stroke: #ffad1d; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gv-pop-icon img { width: 30px; height: 30px; }

.gv-pop--success .gv-pop-icon { background: rgba(77, 174, 128, 0.16); }
.gv-pop--success .gv-pop-icon svg { stroke: #4dae80; }
.gv-pop--error   .gv-pop-icon { background: rgba(242, 84, 75, 0.15); }
.gv-pop--error   .gv-pop-icon svg { stroke: #f2544b; }

/* ---------------------------------------------------------------- text */
.gv-pop-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.gv-pop-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: #b9bdc2;
    word-break: break-word;
}

/* ---------------------------------------------------------------- actions */
.gv-pop-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.gv-pop-btn {
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 13px 16px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.15s ease;
}

.gv-pop-btn:active { transform: translateY(1px); filter: brightness(0.95); }

.gv-pop-btn--primary {
    color: #1a1200;
    background: linear-gradient(180deg, #ffc668, #ffad1d);
    box-shadow: 0 8px 20px rgba(255, 173, 29, 0.24);
}

.gv-pop-btn--ghost {
    color: #c9ced3;
    background: #23262a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------- toast
 * Non-blocking: a compact pill that fades away on its own.
 */
.gv-pop--toast {
    width: auto;
    max-width: 82%;
    padding: 16px 22px;
    border-radius: 16px;
    background: rgba(28, 31, 34, 0.97);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.gv-pop--toast .gv-pop-text { color: #f0f2f4; font-size: 14px; }
.gv-pop--toast .gv-pop-icon { width: 26px; height: 26px; margin: 0; background: none; flex: none; }
.gv-pop--toast .gv-pop-icon svg { width: 22px; height: 22px; }

/* Spinner for the loading state */
.gv-pop-spin {
    width: 24px; height: 24px; flex: none;
    border: 2.5px solid rgba(255, 255, 255, 0.16);
    border-top-color: #ffad1d;
    border-radius: 50%;
    animation: gv-pop-spin 0.7s linear infinite;
}

@keyframes gv-pop-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .gv-pop, .gv-pop-scrim { transition: none; }
    .gv-pop-spin { animation-duration: 1.6s; }
}

/* ---------------------------------------------------------------- close
 * Shown on popups that have no buttons and do not auto-close, so a stalled
 * request can never strand the user.
 */
.gv-pop-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #b9bdc2;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.gv-pop-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.gv-pop--toast .gv-pop-close {
    position: static;
    margin-left: 6px;
    width: 26px;
    height: 26px;
    font-size: 17px;
    flex: none;
}

/* ---------------------------------------------------------------- toast placement
 * A transient message must never swallow a tap. It sits clear of the content
 * near the bottom (above the 64px nav) and lets clicks straight through; only
 * the loader — which owns a close button — stays interactive.
 */
.gv-pop-root.is-toast {
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 88px;
}

.gv-pop--toast:not(.gv-pop--loading) {
    pointer-events: none;
}

.gv-pop-root.is-toast .gv-pop-scrim {
    display: none;   /* nothing to dim for a passing message */
}
