/**
 * Diálogo in-app (lib/rtp-dialog.js): confirmar / avisar con la marca.
 * Por encima de paywall (20050), checkout (52000) y campo del gamepad (999999);
 * debajo de la top bar en pantalla completa y del how-to (2147483646+), que no conviven con él.
 */
.rtp-dialog {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    font-family: var(--rtp-font-ui);
}

.rtp-dialog.hidden,
.rtp-dialog[hidden] {
    display: none;
}

.rtp-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--rtp-bg-app) 55%, #000 45%);
    backdrop-filter: blur(2px);
}

.rtp-dialog__card {
    position: relative;
    width: min(100%, 24rem);
    padding: 1.35rem 1.35rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--rtp-border);
    background: var(--rtp-bg-panel);
    box-shadow: var(--rtp-shadow-soft);
    color: var(--rtp-brand-text);
    animation: rtp-dialog-in 0.16s ease-out;
}

@keyframes rtp-dialog-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rtp-dialog__card {
        animation: none;
    }
}

.rtp-dialog__title {
    margin: 0 0 0.55rem;
    font-family: var(--rtp-font-brand);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.rtp-dialog__msg {
    margin: 0 0 1.15rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--rtp-brand-muted);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.rtp-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.rtp-dialog__btn {
    min-width: 6.5rem;
    padding: 0.62rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: var(--rtp-font-ui);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rtp-transition-ui);
}

.rtp-dialog__btn:focus-visible {
    outline: 2px solid var(--rtp-brand-primary);
    outline-offset: 2px;
}

.rtp-dialog__btn--primary {
    background: var(--rtp-brand-primary);
    color: var(--rtp-on-primary);
}

.rtp-dialog__btn--primary:hover {
    filter: brightness(1.08);
    box-shadow: var(--rtp-hover-glow);
}

.rtp-dialog__btn--danger {
    background: var(--rtp-color-danger);
    color: #fff;
}

.rtp-dialog__btn--ghost {
    background: transparent;
    border-color: var(--rtp-border);
    color: var(--rtp-brand-muted);
}

.rtp-dialog__btn--ghost:hover {
    color: var(--rtp-brand-text);
    border-color: color-mix(in srgb, var(--rtp-brand-primary) 45%, var(--rtp-border));
}

.rtp-dialog__btn[hidden] {
    display: none;
}

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

    .rtp-dialog__btn {
        width: 100%;
    }
}
