/**
 * MsgFlex — mobile & tablet layer.
 *
 * Loaded last so it can correct phone/tablet layouts without editing the
 * desktop stylesheets. Every rule lives inside a max-width media query of
 * 1024px or less, so wider layouts are unaffected — except the auth-page theme
 * toggle fix at the end, which corrects a bug present at every width.
 *
 * Selectors are prefixed with html[data-product="tabconnect"] where they must
 * beat product.css (which uses the same prefix for theme polish).
 * 860px matches the existing off-canvas navigation breakpoint in inbox.css and
 * inbox.js (composerHeightBounds); 699/700 splits phone vs tablet inbox;
 * 640 / 560 / 480 / 400 are phone refinements.
 */

/* ===== Phones & small tablets: off-canvas navigation shell ===== */
@media (max-width: 860px) {
  /*
   * App-like shell: the header stays put and each view scrolls inside
   * main-stage. 100dvh tracks mobile browser chrome and the on-screen
   * keyboard (with interactive-widget=resizes-content).
   */
  html[data-product="tabconnect"] body { overflow: hidden; }
  /*
   * overflow: clip (not hidden) so scrollIntoView() calls cannot scroll the
   * shell itself and push the header off screen; only views scroll.
   */
  html[data-product="tabconnect"] .app {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overflow: clip;
  }

  /*
   * product.css sets .sidebar { position: relative } with higher specificity,
   * which left the hidden drawer occupying a full screen of height above the
   * content. Restore the fixed off-canvas drawer.
   */
  html[data-product="tabconnect"] .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    width: min(300px, 86vw);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    overscroll-behavior: contain;
    /* Above the topbar (z-index 70) so the open drawer is never covered. */
    z-index: 90;
    visibility: hidden;
    transition: transform var(--ease), visibility 0s linear 150ms;
  }
  html[data-product="tabconnect"] .app.nav-open .sidebar {
    visibility: visible;
    transition: transform var(--ease), visibility 0s;
  }
  /* inbox.css forces display: initial !important here, which put the subtitle inline. */
  html[data-product="tabconnect"] .sidebar .brand-text { display: grid !important; }
  html[data-product="tabconnect"] .sidebar-backdrop { z-index: 89; }
  html[data-product="tabconnect"] .app.nav-open .sidebar-backdrop { display: block; }

  html[data-product="tabconnect"] .main-stage {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    overflow: clip;
  }

  /* Compact mobile header */
  html[data-product="tabconnect"] .topbar {
    gap: 8px;
    min-height: 52px;
    padding: 6px 10px;
    padding-top: calc(6px + env(safe-area-inset-top, 0px));
    padding-left: calc(10px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
  }
  html[data-product="tabconnect"] .topbar-nav-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
  }
  html[data-product="tabconnect"] .topbar-copy { gap: 0; }
  html[data-product="tabconnect"] .topbar-crumb,
  html[data-product="tabconnect"] #topbar-sub,
  html[data-product="tabconnect"] #topbar-workspace {
    display: none;
  }
  html[data-product="tabconnect"] .topbar-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html[data-product="tabconnect"] .topbar-leading {
    min-width: 0;
    flex: 1 1 auto;
  }
  html[data-product="tabconnect"] .topbar-actions {
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
    flex-wrap: nowrap;
  }
  html[data-product="tabconnect"] .topbar-icon-btn,
  html[data-product="tabconnect"] .topbar-profile-btn {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 0.35rem;
  }
  html[data-product="tabconnect"] .topbar-wallet-btn {
    min-height: 40px;
    padding: 0.35rem 0.6rem;
  }
  html[data-product="tabconnect"] .topbar .theme-toggle {
    width: 40px;
    height: 40px;
  }
  /* Popovers become sheets under the header and never exceed the screen. */
  html[data-product="tabconnect"] .topbar-popover {
    position: fixed;
    left: calc(10px + env(safe-area-inset-left, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    top: calc(58px + env(safe-area-inset-top, 0px));
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 76px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow: auto;
    overscroll-behavior: contain;
  }

  /* Getting-started banner sits below the header and stacks vertically. */
  html[data-product="tabconnect"] .topbar { order: -1; }
  html[data-product="tabconnect"] .onboarding-banner {
    position: relative;
    flex-direction: column;
    gap: 0.6rem;
    margin: 10px 12px 0;
    padding: 0.8rem 0.9rem;
    flex: 0 0 auto;
  }
  html[data-product="tabconnect"] .onboarding-copy { padding-right: 2.25rem; }
  html[data-product="tabconnect"] .onboarding-copy p { margin: 0.2rem 0 0; }
  html[data-product="tabconnect"] .onboarding-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.4rem;
    padding: 0;
    list-style: none;
    font-size: 12px;
  }
  html[data-product="tabconnect"] .onboarding-steps li {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  html[data-product="tabconnect"] .onboarding-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  html[data-product="tabconnect"] .onboarding-actions > .btn-primary,
  html[data-product="tabconnect"] .onboarding-actions > .secondary {
    flex: 1 1 140px;
    min-height: 40px;
  }
  html[data-product="tabconnect"] #onboarding-dismiss {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
  }

  /*
   * Views scroll inside the shell (inbox.css switches them to overflow:visible
   * for whole-page scrolling at this width); keep content clear of the home
   * indicator.
   */
  html[data-product="tabconnect"] .view {
    overflow: auto;
    padding: 16px 14px;
    padding-left: calc(14px + env(safe-area-inset-left, 0px));
    padding-right: calc(14px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  html[data-product="tabconnect"] .view .segmented-btn { min-height: 36px; }
}

/* Tablets: tighter table cells so data tables fit without sideways scrolling. */
@media (min-width: 641px) and (max-width: 1024px) {
  html[data-product="tabconnect"] .data-table th,
  html[data-product="tabconnect"] .data-table td {
    padding: 10px 8px;
  }
}

/* ===== Inbox on phones: list screen ↔ dedicated chat screen ===== */
@media (max-width: 860px) {
  html[data-product="tabconnect"] .view.inbox-layout {
    padding: 0;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  html[data-product="tabconnect"] .view.inbox-layout .list-pane,
  html[data-product="tabconnect"] .view.inbox-layout .chat-pane {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  html[data-product="tabconnect"] #view-inbox .conversation-list {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html[data-product="tabconnect"] #view-inbox .chip,
  html[data-product="tabconnect"] #view-inbox .filter-tool-btn {
    min-height: 36px;
  }

  html[data-product="tabconnect"] #view-inbox .chat-header.chat-header-redesign {
    gap: 6px;
    padding: 8px 10px 8px;
    padding-left: calc(6px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
  }
  html[data-product="tabconnect"] #btn-back-list {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
  }
  html[data-product="tabconnect"] #view-inbox .chat-header-identity-actions .btn-sm {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }
  /* Workflow controls: one swipeable row instead of three wrapped rows. */
  html[data-product="tabconnect"] #view-inbox .chat-header-actions-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    margin: 0 -10px 0 -6px;
    padding: 6px 10px 2px 6px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  html[data-product="tabconnect"] #view-inbox .chat-header-actions-row::-webkit-scrollbar { display: none; }
  html[data-product="tabconnect"] #view-inbox .chat-header-actions-row > * { flex: 0 0 auto; }
  html[data-product="tabconnect"] #view-inbox .chat-crm-actions .crm-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html[data-product="tabconnect"] #view-inbox .chat-crm-actions .crm-control select {
    min-width: 0;
    max-width: 150px;
    height: 36px;
  }
  html[data-product="tabconnect"] #view-inbox .chat-action-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
  }
  html[data-product="tabconnect"] #view-inbox .chat-action-btn,
  html[data-product="tabconnect"] #view-inbox .label-add-btn,
  html[data-product="tabconnect"] #view-inbox .btn-send-template {
    min-height: 36px;
    white-space: nowrap;
  }
  html[data-product="tabconnect"] #view-inbox .care-window-banner {
    right: calc(10px + env(safe-area-inset-right, 0px));
  }

  html[data-product="tabconnect"] #view-inbox .messages {
    padding-left: 10px;
    padding-right: 10px;
    overflow-wrap: anywhere;
  }
  html[data-product="tabconnect"] #view-inbox .bubble {
    max-width: min(86%, 520px);
    overflow-wrap: anywhere;
  }

  /* Composer: tools · message · send on one row, clear of the home indicator. */
  html[data-product="tabconnect"] #view-inbox .composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px;
    padding: 8px;
    padding-left: calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  html[data-product="tabconnect"] #view-inbox .composer-tools {
    grid-column: auto;
    display: flex;
    gap: 4px;
    align-self: end;
  }
  html[data-product="tabconnect"] #view-inbox .composer-tool {
    min-width: 40px;
    height: 44px;
    justify-content: center;
    padding: 0 8px;
  }
  html[data-product="tabconnect"] #view-inbox .composer-tool .composer-tool-label { display: none; }
  html[data-product="tabconnect"] #view-inbox .composer-template-btn.is-needed .composer-tool-label { display: inline; }
  /* Height is set inline by resizeComposer(); cap it when the keyboard shrinks the screen. */
  html[data-product="tabconnect"] #view-inbox .composer textarea {
    max-height: 30dvh;
    padding: 10px 12px;
  }
  html[data-product="tabconnect"] #view-inbox .composer .btn-send {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
  }

  /* Contact details drawer above the header, near full width. */
  html[data-product="tabconnect"] .context-pane {
    width: min(360px, 92vw);
    z-index: 95;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overscroll-behavior: contain;
  }
  html[data-product="tabconnect"] .view.inbox-layout.context-drawer-open .context-backdrop {
    position: fixed;
    z-index: 94;
  }
  html[data-product="tabconnect"] #btn-context-close {
    width: 40px;
    height: 40px;
  }

  html[data-product="tabconnect"] .inbox-filters-drawer,
  html[data-product="tabconnect"] .inbox-filters-popover {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overscroll-behavior: contain;
  }
}

/* Phones: while a conversation is open the chat owns the screen; Back returns to the list. */
@media (max-width: 699px) {
  html[data-product="tabconnect"] .main-stage:has(#view-inbox.mobile-chat:not(.hidden)) .topbar,
  html[data-product="tabconnect"] .main-stage:has(#view-inbox.mobile-chat:not(.hidden)) .onboarding-banner {
    display: none;
  }
  html[data-product="tabconnect"] #view-inbox.mobile-chat .chat-header.chat-header-redesign {
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }
}

/* Portrait tablets: conversation list and chat side by side. */
@media (min-width: 700px) and (max-width: 860px) {
  html[data-product="tabconnect"] .view.inbox-layout,
  html[data-product="tabconnect"] .view.inbox-layout.mobile-chat {
    grid-template-columns: minmax(var(--list-w), 42%) minmax(0, 1fr);
    grid-template-areas:
      "alert alert"
      "list chat";
  }
  html[data-product="tabconnect"] .view.inbox-layout .list-pane,
  html[data-product="tabconnect"] .view.inbox-layout.mobile-chat .list-pane,
  html[data-product="tabconnect"] .view.inbox-layout:not(.mobile-chat) .chat-pane {
    display: flex;
  }
  html[data-product="tabconnect"] .view.inbox-layout .list-pane {
    border-right: 1px solid var(--line);
  }
  html[data-product="tabconnect"] #view-inbox #btn-back-list { display: none !important; }
}

/* Touch tablets in table layout: checkbox cells are 44×44 tap targets (see mobile.js). */
@media (min-width: 641px) and (max-width: 1024px) and (pointer: coarse) {
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table) :is(td, th):has(> input[type="checkbox"]:only-child) {
    min-width: 44px;
    height: 44px;
    text-align: center;
    cursor: pointer;
  }
}

/* Touch devices: 16px form text stops iOS Safari from zooming on focus. */
@media (max-width: 860px) and (pointer: coarse) {
  html[data-product="tabconnect"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  html[data-product="tabconnect"] select,
  html[data-product="tabconnect"] textarea {
    font-size: 16px;
  }
}

/* ===== Phones: page headers, toolbars and forms ===== */
@media (max-width: 640px) {
  html[data-product="tabconnect"] .page-header {
    gap: 10px;
    margin-bottom: 14px;
  }
  html[data-product="tabconnect"] .page-header > .header-actions,
  html[data-product="tabconnect"] .page-header > .page-header-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }
  html[data-product="tabconnect"] .view .btn-primary,
  html[data-product="tabconnect"] .view button.secondary,
  html[data-product="tabconnect"] .view .btn-sm {
    min-height: 40px;
  }
  /* Contacts filters: full-width search, two-up selects. */
  html[data-product="tabconnect"] .contacts-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  html[data-product="tabconnect"] .contacts-toolbar > .header-actions,
  html[data-product="tabconnect"] .contacts-toolbar .biz-field {
    width: 100%;
  }
  html[data-product="tabconnect"] .contacts-toolbar input[type="search"] { min-width: 0; }
  html[data-product="tabconnect"] .contacts-toolbar .module-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
  }
  html[data-product="tabconnect"] .contacts-toolbar .filter-row-inline,
  html[data-product="tabconnect"] .contacts-bulk-bar .filter-row-inline {
    display: grid;
    gap: 4px;
    margin: 0;
    min-width: 0;
    font-size: 12px;
  }
  html[data-product="tabconnect"] .contacts-toolbar .filter-row-inline select,
  html[data-product="tabconnect"] .contacts-bulk-bar .filter-row-inline select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
  html[data-product="tabconnect"] .contacts-toolbar #contacts-open-audience { grid-column: 1 / -1; }
  html[data-product="tabconnect"] .contacts-bulk-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
  }
  html[data-product="tabconnect"] .contacts-bulk-bar > #contacts-bulk-count,
  html[data-product="tabconnect"] .contacts-bulk-bar > .filter-row-inline {
    grid-column: 1 / -1;
  }
}

/* ===== Phones: wide tables become labelled cards (labels from mobile.js) ===== */
@media (max-width: 640px) {
  html[data-product="tabconnect"] .table-wrap,
  html[data-product="tabconnect"] .tpl-library-scroll,
  html[data-product="tabconnect"] .admin-table-wrap,
  html[data-product="tabconnect"] .business-assets-table-wrap {
    overflow: visible;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    font-size: 14px;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] thead {
    display: block;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] thead tr {
    display: flex;
    justify-content: flex-start;
    border: 0;
  }
  /* Column headers are repeated on each card; keep only "select all". */
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] thead th {
    display: none;
  }
  /* The whole row is the tap target (mobile.js forwards taps to the checkbox). */
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] thead th:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    position: static;
    width: auto;
    min-height: 44px;
    padding: 0 12px 4px 11px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] thead th:has(input[type="checkbox"])::after {
    content: "Select all";
    font-size: 13px;
    color: var(--muted);
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody {
    display: grid;
    gap: 10px;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td {
    display: grid;
    grid-template-columns: minmax(84px, 36%) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    justify-items: start;
    min-width: 0;
    width: auto;
    padding: 7px 0;
    border: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td + td {
    border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  /* Unlabelled cells (actions, empty-state rows) span the card. */
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td:is([data-label=""], [colspan]) {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td:is([data-label=""], [colspan])::before {
    display: none;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td[data-label=""]:has(button, a) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
  /* Row checkbox pins to the card's top-right corner in a 44×44 tap area. */
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td:has(> input[type="checkbox"]:only-child) {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    z-index: 1;
    cursor: pointer;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] tbody td:has(> input[type="checkbox"]:only-child) + td {
    border-top: 0;
    padding-right: 44px;
  }
  html[data-product="tabconnect"] :is(table.data-table, table.tpl-library-table, table.admin-table, table.business-assets-table)[data-mobile-labels] input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  html[data-product="tabconnect"] .contacts-table .contact-consent-btn { min-height: 36px; }
  html[data-product="tabconnect"] .tpl-library-table[data-mobile-labels] .tpl-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  html[data-product="tabconnect"] .tpl-library-table[data-mobile-labels] .tpl-row-actions .linkish {
    min-height: 36px;
    padding: 0 2px;
  }
}

/* ===== Phones: keep the header to one row ===== */
@media (max-width: 560px) {
  /* Theme is also in Settings → Appearance. */
  html[data-product="tabconnect"] #theme-toggle-top { display: none; }
  html[data-product="tabconnect"] .topbar-trial-cta {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
  }
  html[data-product="tabconnect"] .topbar-trial-spark { display: none; }
}
@media (max-width: 480px) {
  /* Trial is also offered on Overview, Profile and Plan & billing. */
  html[data-product="tabconnect"] .topbar-trial-cta { display: none; }
}
@media (max-width: 400px) {
  html[data-product="tabconnect"] .topbar-wallet-icon { display: none; }
  html[data-product="tabconnect"] .topbar { gap: 6px; }
  html[data-product="tabconnect"] .topbar-actions { gap: 4px; }
}

/* ===== Auth pages: sign in, sign up, password reset, email verification ===== */
/*
 * .auth-shell-animated .theme-toggle { position: relative } outranks
 * .login-theme { position: fixed }, so right: 16px pushed the toggle 16px past
 * the left edge at every width.
 */
body.auth-shell .theme-toggle.login-theme {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
}
@media (max-width: 640px) {
  body.auth-shell .theme-toggle.login-theme {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  body.auth-shell .auth-cta-row a.secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}
@media (max-width: 860px) and (pointer: coarse) {
  body.auth-shell input:not([type="checkbox"]):not([type="radio"]),
  body.auth-shell select,
  body.auth-shell textarea {
    font-size: 16px;
  }
}
