/* YUHA "Send feedback" (SCRUM-115): the entry link and the sheet it opens.
 * One stylesheet for the website and both apps. Every rule is .yfb-, so
 * nothing here can reach another screen.
 *
 * Z-INDEX 9900: the sheet is mounted on document.body, so it sits outside
 * #desktopApp (a stacking context at 10) and above the quick-add button (800),
 * the native screen stack (900) and the Workout Plan sheet (1100), while the
 * toast (10000) and the confirm dialog (10001) can still show over it. */

/* ── The entry link, at the bottom of a card under a hairline ─────────── */
.yfb-foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #E5EEEA;
  margin-top: 14px;
  padding: 2px 0 0;
}
/* Full-bleed hairline: the foot reaches the card's own edges. */
.ts-card > .yfb-foot       { margin: 14px -16px -12px; padding: 2px 8px 0; }
.v2d-tsession > .yfb-foot  { margin: 14px -20px -12px; padding: 2px 10px 0; }
.nd-session > .yfb-foot    { margin: 14px -18px -12px; padding: 2px 8px 0; }
.y3p-week > .yfb-foot      { margin: 12px -18px -12px; padding: 2px 8px 0; }
.v2p-week-body > .yfb-foot,
.ns-tp-wk-body > .yfb-foot { margin-top: 10px; }

.yfb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #5E6E68;
  cursor: pointer;
  border-radius: 10px;
}
.yfb-link:hover { color: #0B7A67; }
.yfb-link:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.yfb-link svg { flex: 0 0 auto; }

/* ── The sheet ────────────────────────────────────────────────────────── */
html.yfb-lock, body.yfb-lock { overflow: hidden; }

.yfb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(15, 27, 23, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.yfb-overlay.is-open { opacity: 1; }

.yfb-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #FFFFFF;
  color: #0F1B17;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 32px rgba(15, 27, 23, 0.12);
  padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: inherit;
  text-align: left;
  transform: translateY(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}
.yfb-overlay.is-open .yfb-sheet { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .yfb-overlay, .yfb-sheet { transition: none; }
}
.yfb-sheet * { box-sizing: border-box; }

.yfb-grab {
  align-self: center;
  flex: 0 0 auto;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #CFE6DD;
}

.yfb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.yfb-head-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.yfb-title {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  color: #0F1B17;
  letter-spacing: 0;
}
.yfb-about { font-size: 13px; color: #54635E; }
.yfb-x {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: #F1F6F4;
  color: #54635E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.yfb-x:hover { color: #0F1B17; }

.yfb-sec { display: flex; flex-direction: column; gap: 8px; }
.yfb-q { font-size: 15px; font-weight: 600; color: #0F1B17; }
.yfb-q-sm { font-size: 14px; }

.yfb-opts { display: flex; flex-direction: column; gap: 10px; }
.yfb-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #E5EEEA;
  border-radius: 16px;
  background: #FFFFFF;
  text-align: left;
  color: #0F1B17;
  font: inherit;
  cursor: pointer;
}
.yfb-opt:hover { border-color: #CFE6DD; }
.yfb-opt.is-on {
  border: 2px solid #0d9488;
  padding: 13px 15px;
  background: #EFF8F5;
}
.yfb-opt-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #E8F3EF;
  color: #0B7A67;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yfb-opt-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yfb-opt-t { font-size: 15px; font-weight: 600; }
.yfb-opt-s { font-size: 13px; color: #54635E; line-height: 18px; }
.yfb-radio {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #CFE6DD;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yfb-radio.is-on { border: 0; background: #0d9488; color: #FFFFFF; }

.yfb-change {
  align-self: flex-start;
  min-height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0B7A67;
  cursor: pointer;
}
.yfb-change:hover { color: #0d9488; }

.yfb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.yfb-chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #CFE6DD;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0F1B17;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.yfb-chip.is-on { border-color: #0d9488; background: #0d9488; color: #FFFFFF; font-weight: 600; }

.yfb-more { gap: 6px; }
.yfb-text {
  width: 100%;
  min-height: 104px;
  padding: 12px 14px;
  border: 1.5px solid #CFE6DD;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  color: #0F1B17;
  background: #FFFFFF;
  resize: none;
  outline: none;
}
.yfb-text:focus { border-color: #0d9488; }
.yfb-count { align-self: flex-end; font-size: 12px; color: #5E6E68; font-variant-numeric: tabular-nums; }

.yfb-privacy { margin: 0; font-size: 12px; line-height: 17px; color: #5E6E68; }
.yfb-err {
  font-size: 13px;
  line-height: 18px;
  color: #9F2D20;
  background: #FDF1EF;
  border: 1px solid #F3D3CD;
  border-radius: 12px;
  padding: 10px 12px;
}

.yfb-actions { display: flex; gap: 10px; }
.yfb-btn {
  height: 50px;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 22px;
}
.yfb-send { flex: 1 1 auto; border: 0; background: #0d9488; color: #FFFFFF; }
.yfb-send:hover:not([disabled]) { background: #0B7A67; }
.yfb-send[disabled] { background: #E5EEEA; color: #8A9993; cursor: default; }
/* Phones carry the grab handle and the close button; Cancel is the desktop's. */
.yfb-cancel { display: none; border: 1px solid #CFE6DD; background: #FFFFFF; color: #0F1B17; }
.yfb-btn-ghost { border: 1px solid #CFE6DD; background: #FFFFFF; color: #0F1B17; }
.yfb-btn:focus-visible, .yfb-opt:focus-visible, .yfb-chip:focus-visible,
.yfb-x:focus-visible, .yfb-change:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }

.yfb-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 4px 4px;
  text-align: center;
}
.yfb-sent-ic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E8F3EF;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yfb-sent-p { margin: 0; font-size: 15px; line-height: 22px; color: #54635E; }
.yfb-done { width: 100%; margin-top: 8px; }

/* Desktop: the same sheet, 520 wide, rising from the bottom, no handle, and
   Cancel beside a Send that is not full width. */
@media (min-width: 769px) {
  .yfb-sheet {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 32px rgba(15, 27, 23, 0.14);
    padding: 24px 28px 28px;
    gap: 18px;
  }
  .yfb-grab { display: none; }
  .yfb-x { width: 40px; height: 40px; border-radius: 20px; }
  .yfb-actions { justify-content: flex-end; }
  .yfb-btn { height: 44px; border-radius: 12px; font-size: 15px; }
  .yfb-send { flex: 0 0 auto; padding: 0 26px; }
  .yfb-cancel { display: inline-block; padding: 0 18px; }
  .yfb-done { width: auto; align-self: stretch; }
}
