/* ============================================================
   Sharetheload Chat Widget — sharetheload-widget.css
   Include in every page: <link rel="stylesheet" href="./assets/widget/sharetheload-widget.css">
   ============================================================ */

/* Root container — invisible, just anchors children */
.tt-widget {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483600;
}

/* ── Launcher button (✦) ── */
.tt-widget__launcher {
  pointer-events: all;
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 22px 58px rgba(15, 23, 42, .32);
  font-size: 22px;
  cursor: pointer;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease;
}

.tt-widget__launcher:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 28px 64px rgba(15, 23, 42, .38);
}

/* ── Chat panel (card) ── */
.tt-widget__panel {
  pointer-events: all;
  position: fixed;
  right: 18px;
  bottom: 92px;          /* floats above launcher */
  width: 390px;
  height: min(640px, calc(100dvh - 110px));
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .95);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, .04),
    0 22px 62px rgba(15, 23, 42, .22);
  z-index: 2147483600;
  display: none;
  /* entry animation */
  transform-origin: bottom right;
  animation: tt-panel-in .2s cubic-bezier(.16, 1, .3, 1) both;
}

.tt-widget__panel.is-open {
  display: flex;
  flex-direction: column;
}

@keyframes tt-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── iframe fills the card ── */
.tt-widget__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color-scheme: normal;
  display: block;
  flex: 1;
}

/* ── Close button (×) ── */
.tt-widget__close {
  pointer-events: all;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 31px;
  height: 31px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.tt-widget__close:hover {
  background: rgba(15, 23, 42, .95);
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .tt-widget__panel {
    right: 8px;
    bottom: 88px;
    width: calc(100vw - 16px);
    height: min(72dvh, 560px);
    border-radius: 20px;
  }

  .tt-widget__launcher {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    border-radius: 20px;
  }
}
