/* Primary text CTAs share the home SHOP THE PRODUCTS geometry; widths stay local. */
:is(.primary-link,.secondary-link,.tior-projects-button,.tior-workspace__secondary,.flow-review-actions button,.flow-execution-actions button,.hero-cta,.hero-mosaic__action,.app-card__open,.tior-workspace__primary,
 .flow-header-actions > button:not(.flow-icon)) {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  height:48px!important;
  min-height:48px!important;
  padding-block:0!important;
  border:1px solid var(--action-primary-border)!important;
  border-radius:var(--action-radius)!important;
  corner-shape:var(--corner-curve)!important;
  font-family:var(--font-ui)!important;
  font-size:var(--type-compact-meta)!important;
  font-weight:600!important;
  line-height:var(--leading-compact-meta)!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  text-shadow:none!important;
  box-shadow:none!important;
  background:var(--action-primary-fill)!important;
  color:var(--action-primary-foreground)!important;
}
:is(.primary-link,.secondary-link,.tior-projects-button,.tior-workspace__secondary,.flow-review-actions button,.flow-execution-actions button,.hero-cta,.app-card__open,.tior-workspace__primary,.flow-header-actions > button:not(.flow-icon)):hover:not(:disabled) {
  background:var(--action-primary-hover-fill)!important;
  border-color:var(--action-primary-hover-border)!important;
}
:is(.primary-link,.secondary-link,.tior-projects-button,.tior-workspace__secondary,.flow-review-actions button,.flow-execution-actions button,.app-card__open,.tior-workspace__primary,.flow-header-actions > button:not(.flow-icon)):disabled {
  background:var(--action-primary-disabled-fill)!important;
  color:var(--action-primary-disabled-foreground)!important;
  cursor:not-allowed;
}
/* Plan switches are secondary to the filled current-plan / subscribe actions. */
.app-card__open.is-disabled {
  --action-primary-disabled-fill:var(--theme-canvas);
  --action-primary-disabled-foreground:var(--theme-ink);
  --action-primary-border:var(--line);
}
.pricing-plan-card .pricing-plan-card__cta--switch:not(:disabled) {
  /* Feed the shared default/hover rules instead of competing in specificity. */
  --action-primary-fill:var(--surface);
  --action-primary-foreground:var(--text);
  --action-primary-border:var(--line-strong);
  --action-primary-hover-fill:var(--surface);
  --action-primary-hover-border:var(--text);
}
/* A shared CTA display rule must not reveal an inactive payment-recovery link. */
.pricing-subscription-management [data-pricing-plan-change-action][hidden] { display:none!important; }
/* The shared CTA display rule must also respect KR top-up recovery visibility. */
.pricing-topup-card__purchase > .secondary-link[hidden] { display:none!important; }
.pricing-topup-card__purchase > .secondary-link:not([hidden]) {
  --action-primary-fill:var(--surface);
  --action-primary-foreground:var(--text);
  --action-primary-border:var(--line);
  --action-primary-hover-fill:var(--surface);
  --action-primary-hover-border:var(--text);
  width:100%;
  margin-top:8px;
}

/* KR CTA palette: keep the same orange and white text in both themes.
   Tabs, filters, icon-only controls, and disabled actions retain their states. */
/* Match or exceed :root[data-theme] specificity so theme tokens cannot
   leave a black fill behind the KR orange border. */
:root[data-labs-market="KR"][data-theme] {
  --action-primary-border:var(--labs-primary);
  --action-primary-hover-border:var(--labs-primary-hover);
  --action-primary-fill:var(--labs-primary);
  --action-primary-foreground:#fff;
  --action-primary-disabled-fill:var(--labs-primary);
  --action-primary-disabled-foreground:#fff;
  --action-primary-hover-fill:var(--labs-primary-hover);
  --action-secondary-border:var(--labs-primary);
  --action-secondary-fill:var(--labs-primary);
  --action-secondary-foreground:#fff;
}
html[data-labs-market="KR"] .pricing-plan-card .pricing-plan-card__cta--switch:not(:disabled),
html[data-labs-market="KR"] .pricing-topup-card__purchase > .secondary-link:not([hidden]) {
  --action-primary-fill:var(--labs-primary);
  --action-primary-foreground:#fff;
  --action-primary-border:var(--labs-primary);
  --action-primary-hover-fill:var(--labs-primary-hover);
  --action-primary-hover-border:var(--labs-primary-hover);
}
html[data-labs-market="KR"] .flow-editor .flow-header-actions button[data-action="quote"]:not(:disabled) {
  --action-primary-fill:var(--labs-primary);
  --action-primary-foreground:#fff;
  --action-primary-border:var(--labs-primary);
  --action-primary-hover-fill:var(--labs-primary-hover);
  --action-primary-hover-border:var(--labs-primary-hover);
}
/* Keep Flow's secondary white Save/New controls legible in dark appearance. */
html[data-labs-market="KR"] .flow-editor .flow-header-actions button:is([data-action="new"],[data-action="save"]) {
  --flow-secondary-ink:#111111;
}
html[data-labs-market="KR"] .tior-credit-dialog__actions > a {
  border-color:var(--labs-primary);
  background:var(--labs-primary);
  color:#fff;
}
html[data-labs-market="KR"] .tior-credit-dialog__actions > a:hover {
  border-color:var(--labs-primary-hover);
  background:var(--labs-primary-hover);
  color:#fff;
}
