/*
 * Interaction clarity layer for reporting, manager, HR and ranking screens.
 * Solid teal/navy means action; pale neutral means information; grey means unavailable.
 */
:is(body.interaction-clarity, body.warm-pixel-page) {
  --ic-action: #0f7774;
  --ic-action-hover: #095f5d;
  --ic-action-ink: #fff;
  --ic-secondary-bg: #f7fffc;
  --ic-secondary-border: #177a76;
  --ic-display-bg: rgba(255, 253, 247, .93);
  --ic-display-border: #dfd4c1;
  --ic-ink: #173c49;
  --ic-focus: #f29a38;
  --ic-disabled-bg: #e5e4df;
  --ic-disabled-ink: #848783;
}

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(a[href], button:not([disabled]), summary, [role="button"], [data-clickable="true"]) { cursor: pointer; }

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(a[href], button, summary, [role="button"], input, select, textarea):focus-visible {
  outline: 3px solid var(--ic-focus) !important;
  outline-offset: 3px !important;
}

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(button:disabled, [aria-disabled="true"], .disabled) {
  color: var(--ic-disabled-ink) !important;
  background: var(--ic-disabled-bg) !important;
  border-color: #c8c9c5 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  cursor: not-allowed !important;
}

/* Primary actions are the only solid controls. */
:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.gate-login, .submit, .save, .primary, .download-template-btn,
      .penalty-dashboard-action, .wechat-binding-button, button[type="submit"]) {
  color: var(--ic-action-ink) !important;
  background: var(--ic-action) !important;
  border: 2px solid #123f4a !important;
  box-shadow: 3px 3px 0 rgba(18, 63, 74, .22) !important;
}

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.gate-login, .submit, .save, .primary, .download-template-btn,
      .penalty-dashboard-action, .wechat-binding-button, button[type="submit"]):not(:disabled):hover {
  background: var(--ic-action-hover) !important;
  transform: translate(-1px, -1px) !important;
  box-shadow: 5px 5px 0 rgba(18, 63, 74, .22) !important;
}

/* Secondary navigation stays light with an action-coloured border. */
:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.back, .workspace-logout, .cr-admin-parent, .cr-admin-home,
      .cr-admin-logout, .cr-admin-child, .quarter-switch a, .scope-switch a) {
  color: #0c625f !important;
  background: var(--ic-secondary-bg) !important;
  border: 1px solid var(--ic-secondary-border) !important;
  box-shadow: none !important;
  text-decoration: none;
}

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.back, .workspace-logout, .cr-admin-parent, .cr-admin-home,
      .cr-admin-logout, .cr-admin-child, .quarter-switch a, .scope-switch a):hover {
  color: #fff !important;
  background: var(--ic-action) !important;
  transform: translateY(-1px);
}

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.cr-admin-parent.is-active, .cr-admin-child.is-active,
      .quarter-switch a.active, .scope-switch a.active, [aria-current="page"]) {
  color: #fff !important;
  background: #174d69 !important;
  border-color: #174d69 !important;
  box-shadow: none !important;
}

/* Information cards deliberately have no button-like hard shadow. */
:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.culture-console, .motivation-item, .metric, .fact, .status-summary > div,
      .monthly-summary > div, .status-store, .guide-item, .notice, .scope,
      .identity, .summary, .record, .toolbar, .workbench-alert) {
  background-color: var(--ic-display-bg) !important;
  border-color: var(--ic-display-border) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Clickable cards use one consistent affordance instead of unrelated colours. */
:is(body.interaction-clarity, body.warm-pixel-page) :is(.admin-link, .pending-work-card) {
  color: var(--ic-ink) !important;
  background: #f7fffc !important;
  border: 2px solid var(--ic-action) !important;
  box-shadow: 3px 3px 0 rgba(15, 119, 116, .18) !important;
  text-decoration: none !important;
}

:is(body.interaction-clarity, body.warm-pixel-page) :is(.admin-link, .pending-work-card):hover {
  color: var(--ic-ink) !important;
  background: #e8f7f2 !important;
  border-color: var(--ic-action-hover) !important;
  box-shadow: 6px 6px 0 rgba(15, 119, 116, .2) !important;
  transform: translate(-2px, -2px) !important;
}

:is(body.interaction-clarity, body.warm-pixel-page) :is(.pending-work-action, .menu-action) {
  color: #075d5b !important;
  font-weight: 900 !important;
}

body.interaction-clarity .hero-links .admin-link { --menu-accent: #0f7774 !important; }
body.interaction-clarity .menu-action {
  align-self: center;
  white-space: nowrap;
  font-size: 12px;
}

/* Expanders are controls; content and status chips are not. */
:is(body.interaction-clarity, body.warm-pixel-page) details > summary {
  color: var(--ic-ink) !important;
  background: #e9f6f2 !important;
  border-bottom: 1px solid #b7d9d1;
}

:is(body.interaction-clarity, body.warm-pixel-page) details > summary:hover { background: #dcefe9 !important; }

:is(body.interaction-clarity, body.warm-pixel-page)
  :is(.tag, .pending-work-stat, .status-badge, .operations-tags b, .meta .tag) {
  box-shadow: none !important;
  transform: none !important;
  cursor: default !important;
}

@media (max-width: 640px) {
  :is(body.interaction-clarity, body.warm-pixel-page) :is(a[href], button, summary) { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  :is(body.interaction-clarity, body.warm-pixel-page) * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Store analytics template already exposes a store-view body class. */
body.store-view :is(a[href], button:not([disabled]), summary, [role="button"]) { cursor: pointer; }
body.store-view :is(a[href], button, summary, input, select):focus-visible {
  outline: 3px solid #f29a38 !important;
  outline-offset: 3px !important;
}
body.store-view .nav a {
  color: #075d5b !important;
  background: #f7fffc !important;
  border: 1px solid #177a76 !important;
}
body.store-view .nav a:hover,
body.store-view .nav a[aria-current="page"] {
  color: #fff !important;
  background: #0f7774 !important;
}
body.store-view :is(.channel-summary, .followup-summary) {
  background: #e9f6f2 !important;
  border-color: #b7d9d1 !important;
}
body.store-view :is(.kpi, .card, .fact, .detail-metric) { box-shadow: none !important; }
