/* Message pages (thank-you-messages-in-english.html; later congratulations, birthday and condolence messages).
   Built by tools/wordlist-authoring/build_word_lists.py --q wq_data_messages. Loaded after word-lists.css.
   A message row: the English message, its Hindi meaning (Devanagari + Roman, from build_word_lists.hi()), a formality tag and a
   Copy button. The copy behaviour is the shared one in /assets/self-intro.js ([data-si-copy] inside .si-ex, text from .si-ex-text). */

.wm-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.wm-msg { margin: 0; padding: 12px 14px; border: 1px solid var(--line, #ece8fb); border-radius: 14px; background: var(--card, #fff);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; }
.wm-msg .si-ex-text { grid-column: 1; margin: 0; font-size: 1.0625rem; line-height: 1.5; font-weight: 600; color: var(--ink, #1f1b3a); }
.wm-hi { grid-column: 1; margin: 0; font-size: .9375rem; line-height: 1.45; color: var(--muted, #6b6786); }
.wm-hi .wl-hi { display: block; }
.wm-hi .wl-rom { display: block; font-style: italic; }
.wm-meta { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* formality tags: words and a dot, never colour alone */
.wm-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700;
  white-space: nowrap; background: #f3f0ff; color: #5b21b6; }
.wm-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wm-tag.wm-friendly { background: #fff7ed; color: #9a3412; }
.wm-tag.wm-family { background: #fdf2f8; color: #9d174d; }

.wm-copy { min-height: 44px; min-width: 72px; padding: 0 14px; border: 1.5px solid #d9ccfb; border-radius: 12px; background: #fff;
  font: inherit; font-size: .9375rem; font-weight: 700; color: #6d28d9; cursor: pointer; }
.wm-copy:hover { background: #f3f0ff; }
.wm-copy:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* the answer box at the top: the 5 best short messages */
.wm-answer { padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #f5efff, #fdeef6); border: 1px solid #e4d8fb; }
.wm-answer > p { margin: 0 0 4px; font-weight: 600; }

/* a longer text to copy (email or card), line breaks kept */
.wm-long { margin-top: 12px; }
.wm-long .si-ex-text { white-space: pre-line; font-weight: 400; }
.wm-long .wm-meta { grid-row: 1; }

/* 3-part structure */
.wm-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: wm; }
.wm-steps li { counter-increment: wm; padding: 14px; border-radius: 14px; background: #faf8ff; border: 1px solid var(--line, #ece8fb); line-height: 1.5; }
.wm-steps li::before { content: counter(wm); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%;
  background: #6d28d9; color: #fff; font-weight: 700; }
.wm-steps b { display: block; margin-bottom: 4px; }

/* the "Copied" toast of self-intro.js (word-list pages carry #toast but no style for it) */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 999px;
  background: #1f1640; color: #fff; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .wm-steps { grid-template-columns: minmax(0, 1fr); }
}
/* phones: compact rows, tag and Copy on one line under the message */
@media (max-width: 560px) {
  .wm-msg { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  .wm-msg .si-ex-text { font-size: 1rem; }
  .wm-meta, .wm-long .wm-meta { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
