/* Persistent actions, with space for the footer and device home indicator. */
html {
  scroll-padding-top: 5.5rem;
  scroll-padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
}

body {
  padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
}

.sticky-actions {
  position: fixed;
  z-index: 40;
  right: max(1.5rem, env(safe-area-inset-right, 0px));
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .625rem;
  width: min(25rem, calc(100% - 3rem));
  padding: .625rem;
  border: 1px solid #3a4354;
  border-radius: 1rem;
  background: rgba(14, 18, 25, .96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px #0008;
}

.sticky-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 0;
  min-height: 3.125rem;
  padding: .75rem;
  border: 1px solid transparent;
  border-radius: .625rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.sticky-action svg {
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}

.sticky-action-consult {
  background: #fff;
  color: #101724;
}

.sticky-action-features {
  border-color: #4a566d;
  background: #202938;
  color: #f4f7ff;
}

.sticky-action:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (hover: hover) {
  .sticky-action-consult:hover { background: #e1ebff; }
  .sticky-action-features:hover { background: #2b3950; border-color: var(--accent); }
}

@media (max-width: 900px) {
  .sticky-actions {
    inset: auto 0 0;
    width: 100%;
    gap: .625rem;
    padding: .75rem max(1.25rem, env(safe-area-inset-right, 0px)) calc(.75rem + env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
    border: 0;
    border-top: 1px solid #354056;
    border-radius: 0;
    box-shadow: 0 -8px 32px #0005;
    grid-template-columns: 1.45fr 1fr;
  }
}

@media (max-width: 420px) {
  .sticky-action {
    gap: .25rem;
    padding-inline: .5rem;
    font-size: .875rem;
  }

  .sticky-action svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticky-action { transition: none; }
}

@media print {
  .sticky-actions { display: none; }
  body { padding-bottom: 0; }
}
