/* =============================================
   retention.css - "Stay for half price" modal (js/retention.js), shown
   before a paying user cancels. Loaded on account.html and pricing.html.
   Matches the dark dialog language used elsewhere (css/swipe.css).
   ============================================= */

.rt-backdrop,
.rt-backdrop * {
    box-sizing: border-box;
}

.rt-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200; /* above the sticky nav and its menu */
    display: flex;
    padding: 16px;
    overflow-y: auto;
    /* A solid dim, no frosted blur: the same overlay as the swipe dialogs */
    background: rgba(5, 8, 15, 0.74);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.rt-backdrop.show { opacity: 1; }

.rt-dialog {
    position: relative;
    width: min(440px, 100%);
    margin: auto;
    padding: 32px 28px 26px;
    border-radius: 16px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
    transform: scale(0.96) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: var(--font-body);
}
.rt-backdrop.show .rt-dialog { transform: none; }
.rt-dialog:focus { outline: none; }

.rt-x {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted, #9CA3AF);
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.rt-x:hover { color: var(--text, #F9FAFB); background: rgba(255, 255, 255, 0.08); }

.rt-view h2 {
    margin: 0 28px 12px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text, #F9FAFB);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.rt-view p {
    margin: 0;
    color: var(--text-muted, #9CA3AF);
    font-size: 0.96rem;
    line-height: 1.5;
}

.rt-alert {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(242, 139, 130, 0.12);
    border: 1px solid rgba(242, 139, 130, 0.4);
    color: #FCA5A5;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
}
.rt-alert[hidden] { display: none; }

.rt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.rt-btn-primary {
    min-height: 48px;
    padding: 13px 22px;
    border: none;
    /* The site's one flat primary: deep orange so the white text passes
       4.5:1 (the old light-orange gradient was about 2.8:1), no glow, no lift */
    border-radius: var(--radius-btn);
    cursor: pointer;
    background: var(--accent-strong);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
    text-align: center;
    transition: background-color var(--dur-short) var(--ease-out);
}
.rt-btn-primary:hover { background: var(--accent-strong-hover); }
.rt-btn-primary:disabled,
.rt-btn-primary[aria-busy="true"] { opacity: 0.75; cursor: progress; }

.rt-btn-secondary {
    min-height: 44px;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-muted, #9CA3AF);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.rt-btn-secondary:hover { color: var(--text, #F9FAFB); }

@media (max-width: 480px) {
    .rt-dialog { padding: 26px 20px 20px; }
    .rt-view h2 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rt-backdrop,
    .rt-dialog { transition: none; }
    .rt-dialog { transform: none; }
}
