/* ============================================================
   PRIMIONICS INTERACTION SYSTEM
   Clear primary, secondary and navigation actions across the site.
   Loaded last so it normalises legacy page-specific button systems.
   ============================================================ */

:root {
  --action-orange: var(--o2, #E5551A);
  --action-orange-dark: var(--o1, #C84010);
  --action-navy: var(--n1, #17365D);
  --action-navy-dark: var(--n0, #0F2238);
  --action-border: #AAB8C8;
  --action-soft: #F5F8FB;
  --action-focus: rgba(229, 85, 26, .48);
}

/* ---------- Shared action geometry ---------- */
:where(
  a.btn, button.btn,
  a.pp-btn, button.pp-btn,
  a.dp-btn-primary, button.dp-btn-primary,
  a.dp-btn-sec, button.dp-btn-sec,
  a.pd-cta-primary, button.pd-cta-primary,
  a.pd-cta-secondary, button.pd-cta-secondary,
  a.ss-btn, button.ss-btn,
  a.di-btn, button.di-btn,
  a.ax-btn, button.ax-btn,
  a.cr-btn, button.cr-btn,
  a.cr-mini-btn, button.cr-mini-btn,
  a.pw-btn, button.pw-btn,
  a.pe-btn, button.pe-btn,
  a.svc-nav-cta, button.svc-nav-cta,
  a.tm20-enquire-btn, button.tm20-enquire-btn,
  a.dp-product-sheet-btn, button.dp-product-sheet-btn,
  a.abt-linkedin-btn, button.abt-linkedin-btn,
  a.resource-download, button.resource-download,
  button.qm-submit
) {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 46px !important;
  padding: 11px 21px !important;
  border: 2px solid transparent !important;
  border-radius: 8px !important;
  font-family: var(--f-head, Inter, Arial, sans-serif) !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: .005em !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  white-space: normal !important;
  transition: background-color .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .18s ease,
              transform .18s ease !important;
}

/* ---------- Primary actions: one dominant action per group ---------- */
:where(
  .btn-primary, .btn-orange, .btn.primary,
  .pp-btn-primary,
  .dp-btn-primary, .pd-cta-primary,
  .ss-btn--primary,
  .di-btn--primary,
  .ax-btn-primary,
  .cr-btn-primary,
  .pw-btn-primary,
  .pe-btn.primary,
  .btn-action,
  .svc-nav-cta,
  .tm20-enquire-btn,
  .qm-submit
) {
  background: var(--action-orange) !important;
  border-color: var(--action-orange) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(229, 85, 26, .22) !important;
}

:where(
  .btn-primary, .btn-orange, .btn.primary,
  .pp-btn-primary,
  .dp-btn-primary, .pd-cta-primary,
  .ss-btn--primary,
  .di-btn--primary,
  .ax-btn-primary,
  .cr-btn-primary,
  .pw-btn-primary,
  .pe-btn.primary,
  .btn-action,
  .svc-nav-cta,
  .tm20-enquire-btn,
  .qm-submit
):hover {
  background: var(--action-orange-dark) !important;
  border-color: var(--action-orange-dark) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(229, 85, 26, .28) !important;
}

/* ---------- Secondary actions on light backgrounds ---------- */
:where(
  .btn-outline, .btn-lo, .btn.ghost, .btn.secondary,
  .dp-btn-sec, .pd-cta-secondary,
  .ax-btn-outline,
  .pw-btn-secondary,
  .pe-btn.secondary,
  .cr-btn:not(.cr-btn-primary):not(.cr-btn-ghost),
  .pp-btn-light
) {
  background: #fff !important;
  border-color: var(--action-navy) !important;
  color: var(--action-navy-dark) !important;
  box-shadow: 0 2px 7px rgba(15, 34, 56, .06) !important;
}

:where(
  .btn-outline, .btn-lo, .btn.ghost, .btn.secondary,
  .dp-btn-sec, .pd-cta-secondary,
  .ax-btn-outline,
  .pw-btn-secondary,
  .pe-btn.secondary,
  .cr-btn:not(.cr-btn-primary):not(.cr-btn-ghost),
  .pp-btn-light
):hover {
  background: var(--action-navy) !important;
  border-color: var(--action-navy) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 7px 18px rgba(23, 54, 93, .18) !important;
}

/* White-filled secondary actions used on dark heroes. */
:where(.btn-light) {
  background: #fff !important;
  border-color: #fff !important;
  color: var(--action-navy-dark) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14) !important;
}
:where(.btn-light):hover {
  background: #F3F6F9 !important;
  border-color: #F3F6F9 !important;
  color: var(--action-navy-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
}

/* White-outline secondary actions used on dark sections. */
:where(
  .btn-outline-w,
  .pp-btn-outline,
  .ss-btn--ghost,
  .di-btn--ghost,
  .cr-btn-ghost,
  .ax-btn-secondary,
  .btn-ghost
) {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .78) !important;
  color: #fff !important;
  box-shadow: none !important;
}
:where(
  .btn-outline-w,
  .pp-btn-outline,
  .ss-btn--ghost,
  .di-btn--ghost,
  .cr-btn-ghost,
  .ax-btn-secondary,
  .btn-ghost
):hover {
  background: #fff !important;
  border-color: #fff !important;
  color: var(--action-navy-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16) !important;
}

/* btn-ghost is also used on a few light pages. Restore a navy outline there. */
:where(.sec, .section, main, .soft, .paper) .btn-ghost:not(
  .hero .btn-ghost, .cta .btn-ghost, .dark .btn-ghost,
  .pp-hero .btn-ghost, .ss-hero .btn-ghost, .cr-hero .btn-ghost,
  .di-hero .btn-ghost, .svc-hero .btn-ghost
) {
  background: #fff !important;
  border-color: var(--action-navy) !important;
  color: var(--action-navy-dark) !important;
}

/* ---------- Compact button variants remain compact but clickable ---------- */
:where(.btn-sm, .cr-mini-btn) {
  min-height: 42px !important;
  padding: 9px 17px !important;
  font-size: 12.5px !important;
}
:where(.btn-lg) {
  min-height: 50px !important;
  padding: 13px 28px !important;
  font-size: 14.5px !important;
}

/* ---------- Card footer actions: visible outline controls ---------- */
:where(
  .btn-explore,
  .pcard-explore,
  .tm20-card-cta,
  .sim-explore
) {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 38px !important;
  padding: 8px 15px !important;
  border: 1.5px solid var(--action-navy) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--action-navy-dark) !important;
  font-family: var(--f-head, Inter, Arial, sans-serif) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: background-color .17s ease, color .17s ease,
              border-color .17s ease, transform .17s ease !important;
}
:where(.btn-explore, .pcard-explore, .tm20-card-cta, .sim-explore)::after {
  content: "\2192" !important;
  display: inline !important;
  font-size: 1.05em !important;
  line-height: 1 !important;
  transition: transform .17s ease !important;
}
:where(
  .btn-explore:hover,
  .pcard:hover .pcard-explore,
  .tm20-card:hover .tm20-card-cta,
  .sim-card:hover .sim-explore
) {
  background: var(--action-navy) !important;
  border-color: var(--action-navy) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}
:where(
  .btn-explore:hover,
  .pcard:hover .pcard-explore,
  .tm20-card:hover .tm20-card-cta,
  .sim-card:hover .sim-explore
)::after {
  transform: translateX(3px) !important;
}
.pcard-explore, .tm20-card-cta { width: 100% !important; }

/* ---------- Tertiary navigation links: clear action plus arrow ---------- */
:where(
  .text-link,
  .card-link,
  .ss-card-link,
  .svc-card-link,
  .pf-link,
  .ax-text-link,
  .more,
  .pcc-link,
  .related-body > span:last-child
) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  width: fit-content !important;
  margin-top: 14px !important;
  padding: 5px 0 4px !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(23, 54, 93, .28) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--action-navy-dark) !important;
  font-family: var(--f-head, Inter, Arial, sans-serif) !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  transition: color .16s ease, border-color .16s ease, gap .16s ease !important;
}
:where(
  .text-link,
  .card-link,
  .ss-card-link,
  .svc-card-link,
  .pf-link,
  .ax-text-link,
  .more,
  .pcc-link,
  .related-body > span:last-child
)::after {
  content: "\2192" !important;
  display: inline !important;
  font-size: 1.05em !important;
  line-height: 1 !important;
}
:where(
  a:hover .text-link,
  a:hover .card-link,
  a:hover .ss-card-link,
  a:hover .svc-card-link,
  a:hover .pf-link,
  a:hover .ax-text-link,
  a:hover .more,
  a:hover .pcc-link,
  a:hover .related-body > span:last-child,
  .text-link:hover,
  .card-link:hover,
  .ax-text-link:hover
) {
  color: var(--action-orange-dark) !important;
  border-bottom-color: var(--action-orange) !important;
  gap: 11px !important;
}

/* Card classes that have no existing visual action label. */
.industry-body::after,
.focus-copy::after,
.product-link-card > div:first-child::after {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 15px;
  padding: 5px 0 4px;
  border-bottom: 2px solid rgba(23, 54, 93, .28);
  color: var(--action-navy-dark);
  font-family: var(--f-head, Inter, Arial, sans-serif);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  transition: color .16s ease, border-color .16s ease, gap .16s ease;
}
.industry-body::after { content: "View industry  \2192"; }
.focus-copy::after { content: "Explore technology  \2192"; }
.product-link-card > div:first-child::after { content: "View product  \2192"; }
.industry-card:hover .industry-body::after,
.focus-card:hover .focus-copy::after,
.product-link-card:hover > div:first-child::after {
  color: var(--action-orange-dark);
  border-bottom-color: var(--action-orange);
}

/* ---------- Fully clickable cards ---------- */
:where(
  a.pcard, a.tm20-card, a.sim-card,
  a.industry-card, a.focus-card, a.platform-card, a.announcement-card,
  a.ss-solution-card, a.svc-service-card,
  a.product-card, a.product-link-card, a.product-cat-card,
  a.scope-card, a.area-card, a.solution-card,
  a.portfolio-card, a.model-card, a.pf-card,
  a.related-card, a.adjacent-card, a.card,
  a.pe-pcard
) {
  cursor: pointer !important;
  text-decoration: none !important;
  border-color: rgba(23, 54, 93, .20) !important;
  box-shadow: 0 2px 8px rgba(15, 34, 56, .045) !important;
  transition: transform .19s ease, border-color .19s ease,
              box-shadow .19s ease !important;
}
:where(
  a.pcard, a.tm20-card, a.sim-card,
  a.industry-card, a.focus-card, a.platform-card, a.announcement-card,
  a.ss-solution-card, a.svc-service-card,
  a.product-card, a.product-link-card, a.product-cat-card,
  a.scope-card, a.area-card, a.solution-card,
  a.portfolio-card, a.model-card, a.pf-card,
  a.related-card, a.adjacent-card, a.card,
  a.pe-pcard
):hover {
  transform: translateY(-3px) !important;
  border-color: rgba(229, 85, 26, .72) !important;
  box-shadow: 0 11px 27px rgba(15, 34, 56, .13) !important;
}

/* ---------- Keyboard recognition ---------- */
:where(
  a.btn, button.btn,
  a.pp-btn, button.pp-btn,
  a.dp-btn-primary, a.dp-btn-sec,
  a.pd-cta-primary, a.pd-cta-secondary,
  a.ss-btn, button.ss-btn,
  a.di-btn, button.di-btn,
  a.ax-btn, button.ax-btn,
  a.cr-btn, button.cr-btn,
  a.pw-btn, button.pw-btn,
  a.pe-btn, button.pe-btn,
  .btn-explore,
  a.pcard, a.tm20-card, a.sim-card,
  a.industry-card, a.focus-card, a.platform-card, a.announcement-card,
  a.ss-solution-card, a.svc-service-card,
  a.product-card, a.product-link-card, a.product-cat-card,
  a.scope-card, a.area-card, a.solution-card,
  a.portfolio-card, a.model-card, a.pf-card,
  a.related-card, a.adjacent-card, a.card
):focus-visible {
  outline: 3px solid var(--action-focus) !important;
  outline-offset: 3px !important;
}

/* ---------- Action group spacing ---------- */
:where(
  .hero-actions, .actions, .dp-ctas, .pd-hero-ctas,
  .pp-hero-actions, .pp-link-buttons, .pp-cta-actions,
  .ss-hero-actions, .ss-cta-actions,
  .di-hero-actions, .ax-btns, .cr-hero-actions,
  .svc-cta-actions, .cta-actions, .conversion-panel__actions
) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
}

@media (max-width: 640px) {
  :where(
    .hero-actions, .actions, .dp-ctas, .pd-hero-ctas,
    .pp-hero-actions, .pp-link-buttons, .pp-cta-actions,
    .ss-hero-actions, .ss-cta-actions,
    .di-hero-actions, .ax-btns, .cr-hero-actions,
    .svc-cta-actions, .cta-actions, .conversion-panel__actions
  ) {
    align-items: stretch !important;
  }
  :where(
    .hero-actions, .actions, .dp-ctas, .pd-hero-ctas,
    .pp-hero-actions, .pp-link-buttons, .pp-cta-actions,
    .ss-hero-actions, .ss-cta-actions,
    .di-hero-actions, .ax-btns, .cr-hero-actions,
    .svc-cta-actions, .cta-actions, .conversion-panel__actions
  ) > :where(a, button) {
    width: 100% !important;
  }
}

@media (hover: none) {
  :where(
    a.pcard, a.tm20-card, a.sim-card,
    a.industry-card, a.focus-card, a.platform-card, a.announcement-card,
    a.ss-solution-card, a.svc-service-card,
    a.product-card, a.product-link-card, a.product-cat-card,
    a.scope-card, a.area-card, a.solution-card,
    a.portfolio-card, a.model-card, a.pf-card,
    a.related-card, a.adjacent-card, a.card
  ) {
    border-color: rgba(23, 54, 93, .25) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(a, button, .card-action-label)::after { transition: none !important; }
}

/* Specificity bridge for legacy rules that deliberately hid card arrows. */
.btn-explore.btn-explore::after,
.pcard-explore.pcard-explore::after,
.tm20-card-cta.tm20-card-cta::after,
.sim-explore.sim-explore::after {
  content: "\2192" !important;
  display: inline !important;
}

/* Partner buttons previously used higher-specificity !important rules. */
.pp-btn.pp-btn {
  min-height: 46px !important;
  border-width: 2px !important;
}
.pp-btn.pp-btn-primary {
  border-color: var(--action-orange) !important;
}
.pp-btn.pp-btn-light {
  border-color: var(--action-navy) !important;
}
.pp-btn.pp-btn-outline {
  border-color: rgba(255, 255, 255, .78) !important;
}
