/* Goverse geometry: shared across the website, customer pages and workspace.
   Apple concentricity: inner radius = outer radius - border/padding inset.
   Use the same established border-radius curve in Safari and other browsers. */
:root {
  --gd-radius-none: 0px;
  --gd-radius-xs: 6px;
  --gd-radius-sm: 8px;
  --gd-radius-control: 12px;
  --gd-radius-card: 20px;
  --gd-radius-surface: 28px;
  --gd-radius-pill: 9999px;
  --gd-radius-circle: 50%;
  --gd-radius-card-inner: calc(var(--gd-radius-card) - 1px);
  --gd-radius-surface-inner: calc(var(--gd-radius-surface) - 1px);
  --gd-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Text controls share one radius. Compound search/address controls already
   have a rounded outer frame, so their inner input remains borderless. */
:root input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):where(:not(.bm-search input, .bm-recipient-line > input, .job-lookup-input input)),
:root select:not([data-gd-native]),
:root textarea:not([data-gd-native]) {
  border-radius: var(--gd-radius-control);
}

/* These borders really touch: keep their corner centers aligned. */
.card > .cardhead,
.acto-card > header,
.acto-panel > header {
  border-top-left-radius: var(--gd-radius-card-inner);
  border-top-right-radius: var(--gd-radius-card-inner);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.deck-stage > .deck-panel,
.deck-stage > .deck-leaving {
  border-radius: var(--gd-radius-surface-inner);
}
.deck-nav,
.website-refined .topic-menu.is-open .deck-nav {
  --gd-nav-inset: 8px;
  border-radius: var(--gd-radius-card);
  padding: calc(var(--gd-nav-inset) - 1px);
}
.deck-nav button,
.website-refined .topic-menu .deck-nav button {
  border-radius: max(0px, calc(var(--gd-radius-card) - var(--gd-nav-inset)));
}
#contracten .contract-customer-segment > div {
  --gd-segment-inset: 8px;
  border-radius: var(--gd-radius-card);
  padding: calc(var(--gd-segment-inset) - 1px);
}
#contracten .contract-customer-segment button {
  border-radius: max(0px, calc(var(--gd-radius-card) - var(--gd-segment-inset)));
}

/* The search action sits 5px + a 1px border inside its painted field. */
.gs-input-row {
  border-radius: calc(var(--gd-radius-control) + 6px);
}

/* The show-password action is inset 5px in the surrounding 12px field. */
.login-refined .password-toggle {
  border-radius: max(0px, calc(var(--gd-radius-control) - 5px));
}

/* Keep Safari's native decoration from replacing our authored button shape.
   Checkbox, radio, range, color and select controls retain native interaction. */
button,
.btn,
.button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 760px) {
  /* No scale-based radius changes: the same control stays the same shape. */
  .website-refined .deck-stage {
    border-radius: var(--gd-radius-surface);
  }
  /* Leave clearance for the iPhone home indicator when Safari exposes it. */
  .website-refined .chat-launcher {
    bottom: max(14px, calc(8px + var(--gd-safe-bottom)));
  }
  .website-refined .aurora-toggle {
    bottom: max(16px, calc(8px + var(--gd-safe-bottom)));
  }
}
