/* ====== Trippink Sticky Buttons (namespaced tpkt-) ====== */
/* Host container */
#tpkt-sticky {
  --tpkt-expanded: 200px; /* expanded width on desktop */
  --tpkt-bottom-gap: calc(90px + env(safe-area-inset-bottom, 0px));
  position: fixed !important;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex !important;        /* resist theme display overrides */
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  font-family: "Roboto Slab", serif;
  pointer-events: none;            /* invisible area doesn't block taps */
  isolation: isolate;              /* own stacking context */
}

/* Buttons */
#tpkt-sticky .tpkt-btn:link,
#tpkt-sticky .tpkt-btn:visited { color:#fff; text-decoration:none; }

#tpkt-sticky .tpkt-btn {
  --tpkt-size: 54px;
  width: var(--tpkt-size);
  height: var(--tpkt-size);
  padding: 0 14px 0 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg,#0d0d0d,#1a1a1a);
  border: 1px solid #2a2a2a;
  box-shadow:
    0 8px 20px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(255,255,255,.04);
  transition: width .30s ease, box-shadow .30s ease, transform .15s ease;
  pointer-events: auto;            /* clickable */
  color:#fff;
  will-change: transform, width;
}
#tpkt-sticky .tpkt-btn::before{
  content:"";
  position:absolute; inset:0; border-radius:inherit;
  background: radial-gradient(120px 60px at 20% 0%, rgba(255,255,255,.12), transparent 40%);
  pointer-events:none;
}

/* Only hovered/focused expands */
#tpkt-sticky .tpkt-btn:hover,
#tpkt-sticky .tpkt-btn:focus-visible{
  width: var(--tpkt-expanded);
  transform: translateX(-4px);
  box-shadow:
    0 12px 30px rgba(0,0,0,.75),
    inset 0 0 40px rgba(255,255,255,.08);
}

/* Icon + label */
#tpkt-sticky .tpkt-icon{ flex:0 0 auto; width:28px; display:grid; place-items:center; }
#tpkt-sticky .tpkt-icon i{ font-size:22px; color:#fff; }
#tpkt-sticky .tpkt-label{
  color:#fff;
  white-space:nowrap;
  opacity:0;
  margin-left:0;
  max-width:0;
  font-size:16px; line-height:1;
  transition:max-width .30s ease, opacity .20s ease .05s, margin-left .20s ease .05s;
}
#tpkt-sticky .tpkt-btn:hover .tpkt-label,
#tpkt-sticky .tpkt-btn:focus-visible .tpkt-label{
  opacity:1; margin-left:10px; max-width:180px;
}

/* Tablet: anchor to bottom-right to avoid section clipping */
@media (max-width: 1024px){
  #tpkt-sticky{
    --tpkt-expanded: 180px;
    top: auto;
    bottom: var(--tpkt-bottom-gap);
    transform: none;
    display: flex !important; /* ensure visible on tablet */
  }
  #tpkt-sticky .tpkt-btn{ --tpkt-size: 50px; }
  #tpkt-sticky .tpkt-icon i{ font-size:20px; }
}

/* Phone */
@media (max-width: 767px){
  #tpkt-sticky .tpkt-btn{ --tpkt-size: 48px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  #tpkt-sticky .tpkt-btn, #tpkt-sticky .tpkt-label{ transition: none; }
}
