/**
 * Soft-ask de Greadweb Push.
 * Prefijamos todo con .gwp- para no chocar con el theme.
 */

.gwp-prompt {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
}

.gwp-prompt--visible {
    opacity: 1;
    pointer-events: auto;
}

.gwp-prompt * {
    box-sizing: border-box;
}

/* ---------- Variante barra (abajo, desktop y mobile) ---------- */

.gwp-prompt--bar {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: translateY(16px);
}

.gwp-prompt--bar.gwp-prompt--visible {
    transform: translateY(0);
}

.gwp-prompt--bar .gwp-prompt__content {
    max-width: 460px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    padding: 18px 20px;
}

/* ---------- Variante modal (centrado, con backdrop) ---------- */

.gwp-prompt--modal {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 20px;
}

.gwp-prompt--modal .gwp-prompt__content {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    padding: 26px 24px;
    transform: scale(0.96);
    transition: transform 0.28s ease;
}

.gwp-prompt--modal.gwp-prompt--visible .gwp-prompt__content {
    transform: scale(1);
}

/* ---------- Contenido ---------- */

.gwp-prompt__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
}

.gwp-prompt__body {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.gwp-prompt__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.gwp-prompt__btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 11px 18px;
    border-radius: 9px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.gwp-prompt__btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.gwp-prompt__btn--primary {
    background: #2563eb;
    color: #ffffff;
}

.gwp-prompt__btn--primary:hover {
    background: #1d4ed8;
}

.gwp-prompt__btn--ghost {
    background: transparent;
    color: #64748b;
}

.gwp-prompt__btn--ghost:hover {
    background: #f1f5f9;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
    .gwp-prompt__actions {
        flex-direction: column-reverse;
    }

    .gwp-prompt__btn {
        width: 100%;
        padding: 13px 18px;
    }
}

/* ---------- Modo oscuro del sistema ---------- */

@media (prefers-color-scheme: dark) {
    .gwp-prompt--bar .gwp-prompt__content,
    .gwp-prompt--modal .gwp-prompt__content {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .gwp-prompt__title {
        color: #f8fafc;
    }

    .gwp-prompt__body {
        color: #cbd5e1;
    }

    .gwp-prompt__btn--ghost {
        color: #94a3b8;
    }

    .gwp-prompt__btn--ghost:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

/* ---------- Respeto por prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .gwp-prompt,
    .gwp-prompt--modal .gwp-prompt__content {
        transition: none;
    }
}
