/* Mobile quick links. Without JS this remains a regular block after the footer. */
.mobile-actions {
  display: none;
}

.mobile-actions[hidden] {
  display: none !important;
}

@media screen and (max-width: 700px) {
  .mobile-actions {
    --mobile-actions-button-height: 48px;
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    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 #e8e5ef;
    background: #fff;
    color: #17191c;
    font-family: inherit;
  }

  .mobile-actions-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }

  .mobile-actions-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
    min-height: var(--mobile-actions-button-height);
    padding: 10px 12px;
    border: 1px solid #ded7ef;
    border-radius: 14px;
    background: #fff;
    color: #55419f;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: #6951d81a;
    touch-action: manipulation;
    cursor: pointer;
  }

  .mobile-actions-copy { display:flex; flex-direction:column; gap:2px; min-width:0; max-width:100%; }
  .mobile-actions-price { display:block; white-space:nowrap; font-weight:700; }
  .mobile-actions[data-context="product"] .mobile-actions-inner,
  .mobile-actions[data-context="doctor"] .mobile-actions-inner { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); }
  .mobile-actions[data-context="constructor"] .mobile-actions-inner { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
  .mobile-actions button:disabled { opacity:.6; cursor:wait; }

  html[data-mobile-actions-enabled][data-mobile-actions-suppressed="selection"] .pa-teacher .selection-bar {
    bottom:calc(10px + env(safe-area-inset-bottom,0px));
  }

  .mobile-actions-link.is-primary {
    border-color: #6951d8;
    background: #6951d8;
    color: #fff;
  }

  .mobile-actions-arrow {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-actions-link:hover {
    background: #f5f2fc;
  }

  .mobile-actions-link.is-primary:hover {
    border-color: #5a43c0;
    background: #5a43c0;
  }

  .mobile-actions-link:focus-visible {
    outline: 3px solid #261952;
    outline-offset: 3px;
  }

  html[data-mobile-actions-enabled] body {
    /* Keep this space even while the links are temporarily hidden: no page jump. */
    padding-bottom: calc(var(--mobile-actions-base-padding, 0px) + var(--mobile-actions-space, calc(69px + env(safe-area-inset-bottom, 0px))));
  }

  html[data-mobile-actions-enabled] .mobile-actions[data-enhanced] {
    position: fixed;
    z-index: 25;
    inset: auto 0 0;
    box-shadow: 0 -8px 24px #37255d0a;
  }

  /* CSS also respects the site's menu state before the observer callback. */
  html.menu-open .mobile-actions {
    display: none;
  }

  @supports selector(body:has(dialog[open])) {
    body:has(dialog[open]) .mobile-actions,
    body:has(.pa-menu[open]) .mobile-actions {
      display: none;
    }
  }
}

@media screen and (max-width: 370px) {
  .mobile-actions-arrow { display: none; }
}

@media print {
  .mobile-actions {
    display: none !important;
  }

  html[data-mobile-actions-enabled] body {
    padding-bottom: var(--mobile-actions-base-padding, 0px);
  }
}
