/* iOS app mode for /help/, /privacy/ and /terms/.
 *
 * The iOS app opens these three pages with ?app=ios. An inline script at the
 * top of each page's <head> adds the `app-ios` class to <html> before the
 * body is parsed, so these rules apply from the first paint and the site
 * navigation never flashes. Without the parameter nothing here matches.
 *
 * App Store guideline 3.1.1(a): outside the US the app may not link to pages
 * that lead to a non-Apple purchase, so app mode hides the site navigation,
 * the footer link blocks and every other way onto pricing, checkout, sign-up,
 * the TestFlight beta or the extension installs. What stays is the page's own
 * content, the logo as plain (non-link) branding, links among the three
 * pages (js/app-mode.js carries ?app=ios forward on them) and mailto links.
 * js/app-mode.js then strips the href from any other link, including links
 * added or changed later by other scripts. */

html.app-ios .header .nav-links,
html.app-ios .header .nav-cta-group,
html.app-ios .header .mobile-menu-toggle,
html.app-ios .mobile-nav-overlay,
html.app-ios .footer .footer-section.links,
html.app-ios .footer .social-links,
html.app-ios .ff-notice,
/* Help Center resource cards that lead to storefront pages. */
html.app-ios .help-page a.resource-card[href^="/docs"],
html.app-ios .help-page a.resource-card[href^="/dashboard"],
html.app-ios .help-page a.resource-card[href*="chromewebstore.google.com"],
html.app-ios .help-page a.resource-card[data-app-blocked] {
    display: none !important;
}

/* The logo stays as branding, not a link to the homepage. */
html.app-ios .header .logo a {
    pointer-events: none;
    cursor: default;
}

/* Links js/app-mode.js has neutralized read as plain text. Until it runs,
 * the risky ones in page content cannot be tapped. */
html.app-ios a[data-app-blocked],
html.app-ios main a[href*="pricing"],
html.app-ios main a[href*="checkout"],
html.app-ios main a[href*="upgrade"],
html.app-ios main a[href*="signup"],
html.app-ios main a[href*="sign-up"],
html.app-ios main a[href^="/login"],
html.app-ios main a[href^="/dashboard"],
html.app-ios main a[href*="testflight"],
html.app-ios main a[href*="chromewebstore"],
html.app-ios main a[href*=".xpi"] {
    pointer-events: none;
    cursor: text;
}

html.app-ios a[data-app-blocked] {
    color: inherit;
    text-decoration: none;
}
