/* Shared by the application and the standalone user guide. */
:root {
  --app-radius-detail: 3px;
  --app-radius-small: 6px;
  --app-radius-control: 12px;
  --app-radius-inset: 16px;
  --app-radius-surface: 20px;
  --app-radius-panel: 24px;
  --app-radius-dialog: 28px;
  --app-radius-dock: 30px;
  --app-radius-pill: 999px;
  --app-corner-shape: round;
}

/* Older Safari and embedded browsers retain the same graduated round radii. */
@supports (corner-shape: squircle) {
  :root {
    --app-corner-shape: squircle;
  }
}

/* Body-scoped Arco tokens also reach dropdowns and dialogs rendered in portals. */
body {
  --border-radius-small: var(--app-radius-control);
  --border-radius-medium: var(--app-radius-control);
  --border-radius-large: var(--app-radius-surface);
}

.arco-btn,
.arco-input,
.arco-input-wrapper,
.arco-input-inner-wrapper,
.arco-textarea,
.arco-select-view,
.arco-picker,
.arco-input-number,
.arco-checkbox-mask,
.arco-tag,
.arco-alert,
.arco-message,
.arco-notification,
.arco-pagination-item,
.arco-dropdown-menu,
.arco-dropdown-menu-item,
.arco-select-popup,
.arco-select-option,
.arco-picker-container,
.arco-trigger-menu,
.arco-popover-content,
.arco-popconfirm-content,
.arco-tooltip-content {
  corner-shape: var(--app-corner-shape);
}

body .arco-btn,
body .arco-input-wrapper,
body .arco-input-inner-wrapper,
body .arco-textarea,
body .arco-select-view,
body .arco-picker,
body .arco-input-number {
  border-radius: var(--app-radius-control);
}

body .arco-card,
body .arco-dropdown-menu,
body .arco-select-popup,
body .arco-picker-container,
body .arco-popover-content,
body .arco-popconfirm-content {
  corner-shape: var(--app-corner-shape);
  border-radius: var(--app-radius-surface);
}

body .arco-modal {
  corner-shape: var(--app-corner-shape);
  border-radius: var(--app-radius-dialog);
}

.arco-modal-header {
  corner-shape: inherit;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.app-rounded-inset {
  corner-shape: var(--app-corner-shape);
  border-radius: var(--app-radius-inset);
}

body .arco-checkbox-mask {
  border-radius: var(--app-radius-small);
}

/* These are genuinely circular or capsule-shaped, not rounded rectangles. */
.arco-btn-shape-circle,
.arco-btn-shape-round,
.arco-avatar,
.arco-radio-mask,
.arco-switch,
.arco-switch-dot {
  --app-corner-shape: round;
  corner-shape: round;
}

body .arco-btn.arco-btn-shape-circle,
body .arco-avatar {
  border-radius: 50%;
}

body .arco-btn.arco-btn-shape-round,
body .arco-switch {
  border-radius: var(--app-radius-pill);
}
