/* Shared mobile actions. Desktop navigation and contact controls keep their layout. */
.mobile-action-bar {
  display: none;
}

/* An explicit, keyboard-friendly shortcut within the dark Guide introduction. */
.service-jump {
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
  margin: 28px 0 0;
  padding: 20px 22px;
  border: 1px solid #ffffff30;
  border-radius: 8px;
  background: #ffffff0a;
}

.service-jump label {
  display: block;
  margin: 0 0 10px;
  color: var(--paper, #f5f3ec);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.service-jump > div {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.service-jump select {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 49px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #c5cdc6;
  border-radius: 5px;
  background: var(--paper, #f5f3ec);
  color: var(--ink, #14262d);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.service-jump button {
  flex: 0 0 auto;
  min-width: 66px;
  min-height: 49px;
  border-radius: 5px;
  font-size: 14px;
}

.service-jump button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.service-jump select:focus-visible,
.service-jump button:focus-visible {
  outline: 3px solid var(--orange, #f3a75c);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .service-jump {
    margin-top: 24px;
    padding: 16px 14px;
  }

  .service-jump > div {
    gap: 8px;
  }

  .service-jump select {
    padding-left: 10px;
    padding-right: 10px;
  }

  .service-jump button {
    min-width: 56px;
    padding: 12px 16px;
  }

  :root {
    --mobile-actions-height: 74px;
  }

  .site-has-mobile-actions body,
  body:has(.mobile-action-bar) {
    padding-bottom: calc(var(--mobile-actions-height) + env(safe-area-inset-bottom, 0px));
  }

  html.site-has-mobile-actions {
    scroll-padding-bottom: calc(var(--mobile-actions-height) + 72px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-action-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    box-sizing: border-box;
    min-height: calc(var(--mobile-actions-height) + env(safe-area-inset-bottom, 0px));
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #c5cdc6;
    background: var(--paper, #f5f3ec);
    box-shadow: 0 -3px 18px #14262d1a;
  }

  .mobile-action-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 52px;
    box-sizing: border-box;
    padding: 12px 10px;
    border: 1px solid var(--ink, #14262d);
    border-radius: 6px;
    background: var(--ink, #14262d);
    color: var(--paper, #f5f3ec);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
  }

  .mobile-action-bar a[data-quote-open] {
    border-color: #cf8a43;
    background: var(--orange, #f3a75c);
    color: var(--ink, #14262d);
  }

  .mobile-action-bar a:focus-visible {
    outline: 3px solid #8b4715;
    outline-offset: 3px;
  }

  .site-has-mobile-actions .answers-launcher,
  body:has(.mobile-action-bar) .answers-launcher {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--mobile-actions-height) + 12px + env(safe-area-inset-bottom, 0px));
    z-index: 21;
    min-height: 44px;
    max-width: calc(100% - 32px);
  }

  /* Keep the final footer text clear of both fixed controls at every phone width. */
  .site-has-mobile-actions.site-has-quick-answers .footer-inner,
  body:has(.mobile-action-bar):has(.answers-launcher) .footer-inner {
    padding-bottom: 87px;
  }

  .site-actions-suppressed .mobile-action-bar,
  .site-actions-suppressed .answers-launcher {
    display: none;
    pointer-events: none;
  }

  /* Immediate CSS protection also works before JS runs and while dialogs change. */
  body:has(dialog[open]) .mobile-action-bar,
  body:has(dialog[open]) .answers-launcher,
  body:has(input:focus, textarea:focus, select:focus) .mobile-action-bar,
  body:has(input:focus, textarea:focus, select:focus) .answers-launcher {
    display: none;
    pointer-events: none;
  }
}
