/* Playbooks by team, ported from the phase 2 /hubspot concept (hs-uses): team pills over the HubSpot playbooks; the
   picked team's line and guide, and a ring on its playbooks. The cards are the theme's .card-field and .card-link
   (styles/components.css). Logical properties throughout, so Arabic (dir="rtl") mirrors. */
.hs-uses-head { align-items: flex-end; }
.hs-uses-teams { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px clamp(20px, 3vw, 44px); margin-top: clamp(32px, 4vw, 48px); }
/* The pills: without the script the picked one fills itself; with it, an ink copy of the row clipped to the picked
   pill does, and only the clip moves (the product page's input tabs) */
.hs-uses-tabs {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 4px;
  width: fit-content; max-width: 100%; padding: 5px;
  border-radius: 28px; /* sq: round */ border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.hs-uses-tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 6px 18px 6px 14px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font: 700 15px/1.2 var(--text); text-align: center; cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.hs-uses-tab .i { width: 18px; height: 18px; }
.hs-uses-tab[aria-selected="true"] { color: var(--ground); background: var(--ink); }
.hs-uses-tabs.is-js .hs-uses-tab[aria-selected="true"] { color: var(--ink-soft); background: transparent; }
.hs-uses-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media not all and (pointer: coarse) {
  .hs-uses-tab[aria-selected="false"]:hover { color: var(--ink); background: var(--surface-2); }
}
.hs-uses-ink {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 4px; padding: 5px;
  border-radius: inherit; background: var(--ink);
  pointer-events: none;
  corner-shape: inherit;
}
.hs-uses-tabs .hs-uses-ink .hs-uses-tab { color: var(--ground); background: transparent; }
.hs-uses-ink.is-ready { transition: clip-path 260ms var(--ease-in-out); }
/* The team panels share one cell, so the row keeps the height of the longest and never jumps */
.hs-uses-panels { display: grid; min-width: 0; }
.hs-uses-panel { grid-area: 1 / 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; }
.hs-uses-panel[data-hidden] { visibility: hidden; }
.hs-uses-panel.is-entering > * { animation: hs-uses-in 200ms var(--ease-out); }
@keyframes hs-uses-in { from { opacity: 0; translate: 0 4px; } }
.hs-uses-text { flex: 1 1 100%; max-width: 70ch; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.hs-uses-start { font: 700 15px/1.45 var(--text); }
/* The panels and the ringed cards change as a team is picked; they are never the scroll anchor */
.hs-uses-panels, .hs-uses-list { overflow-anchor: none; }
.hs-uses-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); margin-top: clamp(24px, 3vw, 36px); }
/* A ring marks the picked team's playbooks; it fades, the cards themselves never do */
.hs-use-ring { position: absolute; inset: -1px; border-radius: calc(var(--card-r) * var(--sq-scale, 1)); box-shadow: 0 0 0 3px var(--accent-ink); opacity: 0; transition: opacity 200ms ease; pointer-events: none; corner-shape: var(--sq-shape, round); }
.hs-use.is-pick .hs-use-ring { opacity: 1; }
.hs-use { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 12px; }
@supports not (grid-template-rows: subgrid) {
  .hs-use { display: flex; }
}
.hs-use-tags { display: flex; flex-wrap: wrap; gap: 6px; align-self: start; }
.hs-use-for { font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hs-use .card-cta { align-self: end; color: var(--accent-ink); }

/* Responsive */
@media (max-width: 1023px) {
  .hs-uses-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-uses-teams { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .hs-uses-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559px) {
  /* One column per team (the module sets --hs-teams to the count) */
  .hs-uses-tabs { display: grid; grid-template-columns: repeat(var(--hs-teams, 3), minmax(0, 1fr)); width: 100%; border-radius: calc(26px * var(--sq-scale, 1)); corner-shape: var(--sq-shape, round); }
  .hs-uses-ink { display: grid; grid-template-columns: repeat(var(--hs-teams, 3), minmax(0, 1fr)); }
  .hs-uses-tab { flex-direction: column; gap: 4px; min-height: 58px; padding: 6px 4px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-uses-ink.is-ready { transition: none; }
  .hs-uses-panel.is-entering > * { animation: fade-in 150ms ease both; }
}
