/* FICRU chatbot widget — R2 geometry additions (2026-11-15).
   NEW FILE: load AFTER ficru-chatbot.css on ficru.com and
   meyersadvisory.com (the local ficru-chatbot.css is stale — never
   deploy it; this file only ADDS the R2 geometry rules).
   Expand (the website Finn had no expand button), draggable +
   resizable panel. No attach button on the website (no account, no
   book). The website log has no native scroll-snap in
   ficru-chatbot.css, so no snap removal is needed here — the JS
   settle (finnSnapTargetBoth, scroll-event armed) is the single
   authority. */

/* Header fits TWO 32px buttons now (expand at right:46px + close at
   right:10px), and shows a grab cursor when draggable. */
.ficru-chat-head {
  padding: 13px 84px 12px 14px;
  cursor: grab;
  touch-action: none;
}
.ficru-chat-head:active {
  cursor: grabbing;
}
.ficru-chat-panel.ficru-chat-expanded .ficru-chat-head {
  cursor: default;
}

/* Expand/collapse button. Same 32px circle, same hover treatment as
   the close button, one button-width to its left. */
.ficru-chat-expand {
  position: absolute;
  top: 8px;
  right: 46px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ficru-chat-expand:hover {
  background: rgba(255, 255, 255, 0.14);
}
.ficru-chat-expand svg {
  display: block;
}

/* Expanded state: ~96vw x ~92dvh on desktop, centred; full-bleed
   100vw x 100dvh at <=480px. No max-width cap (a 1400px cap was the
   Slice 4 re-pass bug). The floating button hides while expanded. */
.ficru-chat-panel.ficru-chat-expanded {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 96vw;
  max-width: none;
  height: 92vh;
  height: 92dvh;
  max-height: none;
}
.ficru-chat-panel.ficru-chat-open.ficru-chat-expanded {
  transform: translate(-50%, -50%);
}
.ficru-chat.ficru-chat-expanded .ficru-chat-btn {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 480px) {
  .ficru-chat-panel.ficru-chat-expanded {
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .ficru-chat-panel.ficru-chat-open.ficru-chat-expanded {
    transform: none;
  }
  .ficru-chat-panel.ficru-chat-expanded .ficru-chat-form {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

/* Dragged state + resize handle (same as the in-app R2 rules). */
.ficru-chat-panel.ficru-chat-dragged {
  position: fixed;
  right: auto;
  bottom: auto;
}
.ficru-chat-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
}
.ficru-chat-resize::before,
.ficru-chat-resize::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
}
.ficru-chat-resize::before {
  width: 12px;
  height: 12px;
}
.ficru-chat-resize::after {
  width: 6px;
  height: 6px;
}
.ficru-chat-panel.ficru-chat-expanded .ficru-chat-resize {
  display: none;
}
