/* Approved Figma Make foundations. Load after legacy page styles.
 * !important is limited to shared control geometry/type so legacy container
 * selectors cannot silently turn the same component into a different button.
 * Width, placement, content, icons and application behaviour remain page-owned.
 */
:root {
  --ds-ink: #0d0e12;
  --ds-muted: #667085;
  --ds-field: #f4f5f8;
  --ds-line: #e5e7eb;
  --ds-accent: #c96da9;
  --ds-danger: #b42318;
  --ds-display: "Unbounded", sans-serif;
  --ds-text: "Golos Text", -apple-system, sans-serif;
  --ds-control-radius: 12px;
  --ds-island-radius: 16px;
}
body :is(.btn, .btn--modal-secondary, .action-btn--offer) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px !important; height: auto !important; padding: 12px 20px !important;
  border-radius: var(--ds-control-radius) !important;
  font: 600 14px/18px var(--ds-display) !important;
  letter-spacing: -.01em !important; text-transform: none !important;
  white-space: normal; text-align: center; text-decoration: none;
  box-shadow: none !important; touch-action: manipulation;
  transition: background-color .15s, color .15s, transform .15s;
}
body :is(.action-btn--card, .action-btn--compact, .action-btn--copy, .action-btn--sidebar, .action-btn--acknowledge, .btn--md, .btn--modal-secondary) {
  min-height: 44px !important; padding: 10px 16px !important;
  font-size: 13px !important;
}
body :is(.btn, .action-btn--primary) { border: 1px solid transparent; background: var(--ds-ink) !important; color: #fff !important; }
body :is(.btn, .action-btn--primary):hover:not(:disabled):not([aria-disabled="true"]) { background: #23252d !important; color: #fff !important; }
body :is(.btn-secondary, .btn--modal-secondary, .action-btn--secondary, .btn-transparent) { border-color: transparent; background: var(--ds-field) !important; color: var(--ds-ink) !important; }
body :is(.btn-secondary, .btn--modal-secondary, .action-btn--secondary, .btn-transparent):hover:not(:disabled):not([aria-disabled="true"]) { background: #eef0f4 !important; color: var(--ds-ink) !important; }
body :is(.btn, .btn--modal-secondary, .action-btn--offer):active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.985) !important; }
body :is(.btn, .btn--modal-secondary, .action-btn--offer):is(:disabled, [aria-disabled="true"]) {
  opacity: 1; background: #e4e6ec !important; color: var(--ds-muted) !important; cursor: not-allowed; transform: none;
}
body :is(.btn, .btn--modal-secondary, .action-btn--offer)[aria-busy="true"] { cursor: wait; }
body :is(.btn, .btn--modal-secondary, .action-btn--offer):focus-visible { outline: 2px solid var(--ds-muted); outline-offset: 3px; }
body :is(.form-control:not(.header *), .form-select) {
  border-radius: var(--ds-control-radius) !important;
  font: 400 15px/21px var(--ds-text) !important; color: var(--ds-ink);
  border: 1px solid transparent; background-color: var(--ds-field);
  box-shadow: none; transition: background-color .15s, border-color .15s;
}
body :is(.form-control:not(.header *), .form-select):focus {
  border-color: var(--ds-muted); background-color: #fff;
  outline: 2px solid var(--ds-muted); outline-offset: 2px; box-shadow: none;
}
body :is(.form-control:not(.header *), .form-select):disabled { opacity: .55; cursor: not-allowed; }
body .form-control:not(.header *)[readonly] { opacity: 1; border-color: var(--ds-line); background-color: #fff; }
body .form-control:not(.header *)::placeholder { color: var(--ds-muted) !important; }
body .form-label {
  font: 500 13px/18px var(--ds-text) !important;
  letter-spacing: 0 !important; text-transform: none !important; color: var(--ds-muted);
}
body .form-hint { font: 400 13px/18px var(--ds-text); color: var(--ds-muted); }
body .form-control--invalid { border-color: var(--ds-danger) !important; background-color: #fff2f0; }
body .form-invalid { color: var(--ds-danger); font: 400 13px/18px var(--ds-text); }
.form-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0; margin: 0;
}
.form-switch .form-label { padding: 0; margin: 0; }
/* Native checkboxes remain checkboxes; switches are explicitly marked. */
body .form-check-input[type=checkbox]:not([role=switch]) {
  width: 22px; height: 22px; border-radius: 7px; accent-color: var(--ds-accent);
}
body .form-check-input[role=switch] {
  position: relative; display: block; flex: 0 0 51px; width: 51px; height: 31px;
  margin: 6.5px 0; padding: 0; border: 0; border-radius: 999px; appearance: none;
  background: #e4e6ec; box-shadow: none; cursor: pointer; transition: background-color .2s ease-out;
}
body .form-check-input[role=switch]::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(13 14 18 / 18%);
  transform: translateX(0); transition: transform .2s ease-out;
}
body .form-check-input[role=switch]:checked { border: 0 !important; background: var(--ds-accent); }
body .form-check-input[role=switch]:checked::after { transform: translateX(20px); }
body .form-check-input[role=switch]:disabled { opacity: .4; cursor: not-allowed; }
body .form-check-input:focus { box-shadow: none !important; }
body .form-check-input:focus-visible { outline: 2px solid var(--ds-muted); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  body :is(.btn, .action-btn--offer, .form-control:not(.header *), .form-select, .form-check-input), body .form-check-input::after { transition: none !important; }
  body :is(.btn, .btn--modal-secondary, .action-btn--offer):active:not(:disabled) { transform: none !important; }
}

body :is(.popup-title, .popup-auth h2) { font: 600 22px/26px var(--ds-display) !important; letter-spacing: -.03em !important; text-transform: none !important; }
.ds-segmented-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.ds-segmented { display: flex; gap: 4px; padding: 4px; border-radius: var(--ds-control-radius); background: var(--ds-field); }
.ds-segmented label { position: relative; display: flex; flex: 1; min-width: 0; cursor: pointer; }
.ds-segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ds-segmented span { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 36px; padding: 8px; border-radius: 9px; color: var(--ds-muted); font: 500 14px/20px var(--ds-text); }
.ds-segmented input:checked + span { background: #fff; color: var(--ds-ink); box-shadow: 0 1px 6px rgb(13 14 18 / 8%); }
.ds-segmented input:focus-visible + span { outline: 2px solid var(--ds-muted); outline-offset: 2px; }
.ds-segmented input:disabled + span { opacity: .4; cursor: not-allowed; }

body :is(input.form-control:not(.header *), .form-select) { min-height: 52px !important; }
body textarea.form-control:not(.header *) { min-height: 100px; }
