/* Floating coach chat: fixed button + slide-up bottom sheet (Oct 28, 2026).
 * The sheet is a fixed overlay, so opening or closing it never navigates
 * the page and never moves the member's scroll position. */

#vlCoachFab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--lime, #d6ff38);
  color: #0a0a0f;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  z-index: 250;
}

#vlCoachSheetWrap {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  visibility: hidden;
}

#vlCoachSheetWrap.open {
  pointer-events: auto;
  visibility: visible;
}

#vlCoachSheetBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.28s ease;
}

#vlCoachSheetWrap.open #vlCoachSheetBackdrop {
  opacity: 1;
}

#vlCoachSheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #0a0a0f);
  color: var(--bone, #f2ede1);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

#vlCoachSheetWrap.open #vlCoachSheet {
  transform: translateY(0);
}

.vl-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #222;
  flex: 0 0 auto;
}

.vl-sheet-headbtns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.vl-sheet-headbtns button {
  background: none;
  border: 1px solid #444;
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}

#vlSheetMsgs {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.vl-sheet-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 15px;
  word-wrap: break-word;
}

.vl-sheet-msg.user {
  align-self: flex-end;
  background: var(--lime, #d6ff38);
  color: #0a0a0f;
}

.vl-sheet-msg.coach {
  align-self: flex-start;
  background: #1e1e26;
  color: var(--bone, #f2ede1);
}

.vl-sheet-proposal {
  display: block;
  margin-top: 8px;
  background: none;
  border: 1px solid var(--lime, #d6ff38);
  color: var(--lime, #d6ff38);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}

.vl-sheet-empty {
  color: #8a8a8a;
  font-size: 14px;
}

.vl-sheet-status {
  flex: 0 0 auto;
  min-height: 18px;
  padding: 0 16px 4px;
  font-size: 13px;
  color: #8a8a8a;
}

.vl-sheet-status.error {
  color: #ff7a7a;
}

#vlSheetForm {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #222;
}

#vlSheetInput {
  flex: 1 1 auto;
  resize: none;
  border-radius: 12px;
  border: 1px solid #333;
  background: #14141a;
  color: inherit;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}

#vlSheetSend {
  flex: 0 0 auto;
  background: var(--lime, #d6ff38);
  color: #0a0a0f;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

#vlSheetSend:disabled {
  opacity: 0.5;
}
