/* account-messages.css: the message banner at the top of the coach app (js/account-messages.js).
 *
 * The ChatGPT banner's light, playful look (css/chatgpt-intro.css), in the same place, at a
 * FIXED size: Alex, 23 Oct 2026, "We don't change the size of it, it just stays in that
 * area." The media box is a fixed 16:9 tile, the body is clamped, so a long message or a
 * video never makes the dashboard jump. Large plain text for 50+ coaches; phone first.
 * Themes: mint (default), peach, sky, plain. The sheets reuse .rel-editor (CBSheet). */
.amsg-bar { margin: 0 0 18px; }
.amsg-bar[hidden] { display: none !important; }

.amsg-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body actions";
  gap: 12px 22px; align-items: center; height: 176px; overflow: hidden; box-sizing: border-box;
  padding: 18px 56px 40px 20px; border-radius: var(--radius-lg, 18px); color: #1C1E26;
  border: 1px solid #CDEFE1; background: linear-gradient(100deg, #E8FAF2 0%, #F4FBF7 45%, #FFF4EC 100%);
}
.amsg-card.has-media { grid-template-columns: 200px minmax(0, 1fr) auto; grid-template-areas: "media body actions"; }
.amsg-theme-peach { background: linear-gradient(100deg, #FFF1E8 0%, #FFF8F2 55%, #FDF3FA 100%); border-color: #F6D9C6; }
.amsg-theme-sky { background: linear-gradient(100deg, #EAF3FF 0%, #F5F9FF 55%, #EEF8F6 100%); border-color: #CFE0F7; }
.amsg-theme-plain { background: #FFFFFF; border-color: #DDE4E1; }

.amsg-media {
  grid-area: media; position: relative; width: 200px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #10171A; border: 0; padding: 0; display: block; align-self: center;
}
.amsg-media img, .amsg-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.amsg-play { cursor: pointer; }
.amsg-play-ic {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.amsg-play-ic::after {
  content: ""; position: absolute; left: 18px; top: 14px; border-style: solid; border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #0B7A5E;
}
.amsg-play:focus-visible { outline: 3px solid #F5C451; outline-offset: 2px; }

.amsg-body { grid-area: body; min-width: 0; }
.amsg-badge {
  display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid #9FE3C7;
  color: #0B6B53; background: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.amsg-title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 800; color: #1C1E26; }
.amsg-text {
  margin: 4px 0 0; font-size: 16px; line-height: 1.45; color: #3F4350; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.amsg-count { margin: 8px 0 0; font-size: 15px; color: #3F4350; }
.amsg-count strong { display: inline-block; padding: 2px 10px; border-radius: 8px; background: #1C1E26; color: #fff; font-variant-numeric: tabular-nums; }

.amsg-actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.amsg-go {
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; cursor: pointer; white-space: nowrap;
  background: #0B7A5E; color: #fff; font-size: 16px; font-weight: 700; box-shadow: 0 4px 12px rgba(11, 122, 94, 0.25);
}
.amsg-go:hover { background: #096A51; }
.amsg-go2 {
  min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid #0B7A5E; background: #fff; color: #0B6B53; font-size: 15px; font-weight: 700;
}
.amsg-go:focus-visible, .amsg-go2:focus-visible, .amsg-arrow:focus-visible, .amsg-past:focus-visible { outline: 3px solid #F5C451; outline-offset: 2px; }

.amsg-close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #5B6070; font-size: 24px; line-height: 1; cursor: pointer;
}
.amsg-close:hover, .amsg-close:focus-visible { background: rgba(28, 30, 38, 0.07); color: #1C1E26; }
.amsg-close:focus-visible { outline: 3px solid #F5C451; outline-offset: 1px; }

.amsg-foot { position: absolute; right: 16px; bottom: 8px; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.amsg-arrow {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(28, 30, 38, 0.15); background: #fff;
  color: #1C1E26; font-size: 20px; line-height: 1; cursor: pointer;
}
.amsg-pos { font-size: 14px; color: #4A4F5C; min-width: 46px; text-align: center; }
.amsg-past { margin-left: 10px; border: 0; background: transparent; color: #0B6B53; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 6px 4px; }
/* "Not now" (24 Oct 2026): the soft choice beside the close, in Past messages' quiet link style, so
   the one strong button on the card stays the next step. */
.amsg-later { margin-right: 4px; border: 0; background: transparent; color: #4A4F5C; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 6px 4px; white-space: nowrap; }
.amsg-later:hover { color: #1C1E26; }
.amsg-later:focus-visible { outline: 3px solid #F5C451; outline-offset: 2px; }

/* The sheets: .rel-editor, a little wider for a video or a booking page. */
.amsg-sheet { width: min(560px, calc(100vw - 32px)); }
.amsg-sheet-wide { width: min(920px, calc(100vw - 32px)); }
.amsg-sheet-body { max-height: calc(100vh - 160px); overflow: auto; }
.amsg-frame { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #10171A; }
.amsg-frame-video { aspect-ratio: 16 / 9; }
.amsg-frame-tall { height: min(680px, calc(100vh - 220px)); background: #fff; }
.amsg-frame iframe, .amsg-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.amsg-sheet-note { margin: 10px 0 0; font-size: 14px; }
.amsg-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.amsg-hist-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #ECEFEE; }
.amsg-hist-main { min-width: 0; }
.amsg-hist-title { margin: 0; font-weight: 700; font-size: 16px; }
.amsg-hist-text { margin: 4px 0 0; font-size: 15px; color: #3F4350; white-space: pre-line; }
.amsg-hist-when { margin: 4px 0 0; font-size: 13px; color: #5B6070; }
.amsg-hist-acts { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }

/* At 1100px and below the app's menu button sits fixed top right (chatgpt-intro.css). */
@media (max-width: 1100px) {
  .amsg-close { right: 60px; }
  .amsg-card { padding-right: 108px; }
}
@media (max-width: 760px) {
  .amsg-card, .amsg-card.has-media {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "body" "actions" "foot";
    height: auto; min-height: 0; padding: 16px; padding-top: 52px;
  }
  .amsg-foot { position: static; grid-area: foot; }
  .amsg-text { -webkit-line-clamp: 4; }
  .amsg-media { width: 100%; max-height: 140px; }
  .amsg-close { right: 60px; top: 8px; }
  .amsg-title { font-size: 19px; }
  .amsg-foot { justify-content: space-between; }
  .amsg-later, .amsg-past { white-space: nowrap; margin-left: 0; margin-right: 0; }
  .amsg-hist-row { flex-direction: column; }
}
