/* The mobile section's app buttons and the early-access dialog (ADR 0092). Their own sheet, pushed by the mobile
   partial: the buttons keep the badges' look from landing-home.css (.h-mob__badge and its i, span and small), and
   only the button inside each badge and the dialog are drawn here. Written for the old Chrome on POS terminals too:
   no :has(), no container queries, no color-mix(); :user-invalid sits in a rule of its own, so a browser that
   doesn't know it drops that rule alone. */

/* The badge holds a button (or, once a store listing is out, a link) that fills it, so the whole pill is the target */
.h-mob__badge.h-mob__badge--app { padding: 0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.h-mob__badge.h-mob__badge--app:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgb(21 30 49 / 0.6); }
.h-mob__app {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 0; padding: 9px 16px 9px 12px; border: 0; border-radius: inherit;
    background: none; color: inherit; font: inherit; text-align: start; text-decoration: none; cursor: pointer;
}
.h-mob__app:hover { color: inherit; }
.h-mob__app:focus-visible { outline: 3px solid var(--h-400); outline-offset: 3px; }

/* The answer without the page's script (NewsletterController::back) */
.h-mob__asked { margin-top: 14px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--h-700); }
.h-mob__asked:empty { display: none; }
.h-mob__asked.is-error { color: #b42318; }

/* The dialog: a white card in the middle of the screen, its own scroll if the screen is short */
dialog.h-app {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; margin: auto;
    box-sizing: border-box; width: calc(100% - 32px); max-width: 440px; max-height: calc(100% - 32px);
    padding: 28px 28px 24px; border: 0; border-radius: 20px;
    background: #fff; color: var(--h-ink);
    box-shadow: 0 30px 60px -20px rgb(21 30 49 / 0.45);
    overflow: auto; overscroll-behavior: contain;
    font-family: "Geist", ui-sans-serif, system-ui, sans-serif; text-align: start;
}
/* ::backdrop inherits no custom property in older browsers: plain colours */
dialog.h-app::backdrop { background: rgb(21 30 49 / 0.55); overflow: hidden; overscroll-behavior: contain; }

.h-app__close {
    position: absolute; top: 12px; inset-inline-end: 12px;
    display: grid; place-items: center; width: 40px; height: 40px;
    border: 0; border-radius: 50%; background: var(--h-fill); color: var(--h-ink); font-size: 15px; cursor: pointer;
}
.h-app__close:hover { background: var(--h-100); }
.h-app__close:focus-visible { outline: 3px solid var(--h-400); outline-offset: 2px; }

.h-app__marks { display: flex; gap: 8px; margin: 0 0 16px; }
.h-app__marks span {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--h-950); color: var(--h-accent-on-dark); font-size: 20px; line-height: 1;
}
.h-app__marks .h-app__tick { display: none; background: var(--h-400); color: var(--h-950); font-size: 24px; }
.h-app.is-done .h-app__marks span { display: none; }
.h-app.is-done .h-app__marks .h-app__tick { display: grid; }

.h-app__title {
    margin: 0; padding-inline-end: 40px;
    font-family: "IBM Plex Sans", "Geist", ui-sans-serif, system-ui, sans-serif;
    font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.3px; color: var(--h-ink);
}
.h-app__title:focus { outline: none; }
.h-app__lead { margin: 8px 0 0; font-size: 15px; line-height: 23px; color: var(--h-text); }

.h-app__form { margin-top: 20px; }
.h-app__label { display: block; margin: 0 0 6px; padding: 0; font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--h-ink); }

.h-app__phones { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.h-app__phone-row { display: flex; gap: 8px; }
.h-app__phone { position: relative; flex: 1 1 0; min-width: 0; }
.h-app__phone input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.h-app__phone span {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
    border: 1.5px solid var(--h-border); border-radius: 12px; background: #fff;
    font-size: 15px; font-weight: 600; color: var(--h-ink);
}
.h-app__phone i { font-size: 17px; line-height: 1; }
.h-app__phone input:checked + span { border-color: var(--h-600); background: var(--h-50); box-shadow: inset 0 0 0 1px var(--h-600); }
.h-app__phone input:focus-visible + span { outline: 3px solid var(--h-400); outline-offset: 2px; }

.h-app__field { display: block; margin: 0 0 14px; }
.h-app__input {
    display: block; box-sizing: border-box; width: 100%; height: 48px; margin: 0; padding: 0 14px;
    border: 1.5px solid var(--h-border); border-radius: 12px; background: #fff; color: var(--h-ink);
    font: inherit; font-size: 16px; /* 16px: a phone doesn't zoom into the field */
}
.h-app__input:focus { outline: none; border-color: var(--h-600); box-shadow: 0 0 0 3px rgb(97 206 112 / 0.28); }
.h-app__input:user-invalid { border-color: #f04438; }

.h-app__check {
    display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; padding: 12px 14px;
    border-radius: 12px; background: var(--h-fill); cursor: pointer;
}
.h-app__check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--h-600); cursor: pointer; }
.h-app__check strong { display: block; font-size: 14.5px; line-height: 20px; font-weight: 600; color: var(--h-ink); }
.h-app__check small { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--h-text); }

.h-app__submit, .h-app__done .h-button { width: 100%; }
.h-app__status { margin: 12px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: #b42318; }
.h-app__status:empty { display: none; }
.h-app__note { margin: 14px 0 0; font-size: 12.5px; line-height: 18px; color: var(--h-text); text-align: center; }
.h-app__note a { color: var(--h-700); text-decoration: underline; text-underline-offset: 2px; }
.h-app__done { margin-top: 22px; }

@media (max-width: 480px) {
    dialog.h-app { padding: 24px 20px 20px; border-radius: 18px; }
    .h-app__title { font-size: 21px; line-height: 27px; }
}

@media (prefers-reduced-motion: no-preference) {
    dialog.h-app[open] { animation: h-app-in 0.22s cubic-bezier(0.2, 0.75, 0.25, 1); }
    @keyframes h-app-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
}
