/* ============================================================================
   SorbiTech R4 â Side Contact Rail  (widget.css)
   Vertical column pinned to the RIGHT EDGE, mid-viewport. Three channels:
   WhatsApp Â· Phone Â· Email. Always visible â no toggle. Each row collapses
   to an icon by default; hovering or focusing the row expands it leftward
   to reveal the channel label. Mobile collapses to a tight bottom-right
   cluster of three small circular icons.

   Built Session 22 (2026-06-11). Replaces the previous .st-float-widget
   toggle-based widget. Palette tokens only (WhatsApp green is the locked
   third-party scoped exception per palette-usage-spec.md).
   ========================================================================== */

/* ââ Wrapper â fixed to right edge, positioned in the lower quarter ââââââ
   bottom: 120px keeps it clear of the hero slider prev/next arrows which
   sit at mid-viewport. Smaller and rounder than previous versions per
   review 2026-06-18. */
.st-side-contact {
  position: fixed;
  bottom: 120px;
  right: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

/* Each row is an <a>; pointer-events restored just on the rows so hover
   targets are tight and the surrounding gap does not capture clicks.
   Icon size reduced from 56px to 48px for a lighter visual footprint. */
.st-side-contact__item {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 34px 0fr;
  grid-template-rows: 34px;
  align-items: stretch;
  color: var(--st-white);
  text-decoration: none;
  font-family: var(--st-font-sans, inherit);
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  border-radius: 14px 0 0 14px;
  transition: grid-template-columns 320ms cubic-bezier(.22,.61,.36,1),
              box-shadow 240ms ease,
              filter 240ms ease;
  box-shadow: -3px 0 10px rgba(15, 42, 92, 0.14);
  border: none;
}

.st-side-contact__icon {
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--st-white);
}

.st-side-contact__icon svg {
  width: 15px;
  height: 15px;
}

.st-side-contact__label {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding-inline: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 200ms ease 80ms, padding-inline 320ms cubic-bezier(.22,.61,.36,1);
  letter-spacing: 0.02em;
}

/* Hover / focus reveals the label by expanding the second grid column */
.st-side-contact__item:hover,
.st-side-contact__item:focus-visible {
  grid-template-columns: 34px 1fr;
  filter: brightness(1.04);
  box-shadow: -5px 0 16px rgba(15, 42, 92, 0.22);
}
.st-side-contact__item:hover .st-side-contact__label,
.st-side-contact__item:focus-visible .st-side-contact__label {
  opacity: 1;
  padding-inline: var(--st-space-4) var(--st-space-5);
}

.st-side-contact__item:focus-visible {
  outline: 2px solid var(--st-white);
  outline-offset: -4px;
}

/* ââ Channel colours â palette tokens, WhatsApp green is scoped exception ââ */
.st-side-contact__item--whatsapp { background: var(--st-whatsapp, #25D366); }
.st-side-contact__item--phone    { background: var(--st-navy, #0F2A5C); }
.st-side-contact__item--email    { background: var(--st-blue, #2F66C4); }

/* ââ Reduced motion: keep the transition trivial ââââââââââââââââââââââââââ */
@media (prefers-reduced-motion: reduce) {
  .st-side-contact__item,
  .st-side-contact__label {
    transition: none;
  }
}

/* ââ Tablet (md & below: 1023px) â same compact size âââââââââââââââââââââ */
@media (max-width: 1023px) {
  .st-side-contact__item {
    grid-template-columns: 30px 0fr;
    grid-template-rows: 30px;
  }
  .st-side-contact__icon { width: 30px; }
  .st-side-contact__icon svg { width: 13px; height: 13px; }
  .st-side-contact__item:hover,
  .st-side-contact__item:focus-visible {
    grid-template-columns: 30px 1fr;
  }
}

/* ââ Mobile (sm & xs: 767px and below) â tight bottom-right cluster âââââââ */
@media (max-width: 767px) {
  .st-side-contact {
    top: auto;
    bottom: var(--st-space-4);
    right: var(--st-space-4);
    transform: none;
    flex-direction: column-reverse;
    gap: var(--st-space-3);
  }
  .st-side-contact__item {
    grid-template-columns: 44px 0fr;
    grid-template-rows: 44px;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(15, 42, 92, 0.28);
  }
  .st-side-contact__icon { width: 44px; }
  .st-side-contact__icon svg { width: 18px; height: 18px; }
  /* Labels are hidden completely on mobile â taps trigger the action directly */
  .st-side-contact__item:hover,
  .st-side-contact__item:focus-visible {
    grid-template-columns: 44px 0fr;
  }
  .st-side-contact__label { display: none; }
}

/* ââ Print: hide the rail âââââââââââââââââââââââââââââââââââââââââââââââââ */
@media print {
  .st-side-contact { display: none; }
}
