/* Language Practice Engine — the parts Tailwind utilities should not carry.
   Tailwind loads first (CDN), so these rules win where they overlap. */

/* ---------------------------------------------------------- signature
   The pair chip. Every screen that involves two people shows the exchange
   as a single object: your language, the arrow, theirs. */
.pair {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid #e5e4df; background: #fff;
  border-radius: 999px; padding: .3rem .75rem;
  font-size: 13.5px; font-weight: 500; line-height: 1.2;
  white-space: nowrap;
}
.pair__arrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #2f3fd6; font-size: 15px;
}
.pair--lg { font-size: 15px; padding: .45rem 1rem; }

/* ------------------------------------------------- phrasebook entry card
   Modelled on a printed phrasebook line: target phrase, pronunciation in
   mono underneath, meaning last and quietest. */
.entry { border: 1px solid #e5e4df; background: #fff; border-radius: 14px; padding: .9rem 1rem; }
.entry__target { font-size: 18px; font-weight: 600; line-height: 1.35; }
.entry__roman  { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; color: #2f3fd6; margin-top: .15rem; }
.entry__meaning{ font-size: 13.5px; color: #4d545c; margin-top: .35rem; }

/* --------------------------------------------------------------- choices
   Big tap targets for the language / level / topic pickers. */
.choice {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid #e5e4df; background: #fff; border-radius: 14px;
  padding: .8rem .9rem; transition: border-color .12s, box-shadow .12s, background .12s;
}
.choice:hover { border-color: #c3caff; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.is-on { border-color: #2f3fd6; background: #eef0ff; box-shadow: inset 0 0 0 1px #2f3fd6; }
.choice__flag { font-size: 22px; line-height: 1; }
.choice__name { font-weight: 600; }
.choice__native { font-size: 12.5px; color: #4d545c; }

/* ------------------------------------------------------------------ chat */
.bubble { max-width: 78%; border-radius: 16px; padding: .5rem .75rem; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble--me    { background: #2f3fd6; color: #fff; border-bottom-right-radius: 5px; margin-left: auto; }
.bubble--them  { background: #fff; border: 1px solid #e5e4df; border-bottom-left-radius: 5px; }
.bubble--tool  { background: #fffaeb; border: 1px dashed #e6c669; color: #4a3b12; max-width: 100%; }
.bubble--system{ background: transparent; border: 0; color: #8b9199; font-size: 12.5px; text-align: center; max-width: 100%; }
.bubble time { display: block; margin-top: .2rem; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; opacity: .65; }

/* typing indicator */
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #8b9199; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }

/* conversation timer: a bar that drains, so time left is felt not read */
.timer { height: 4px; background: #e5e4df; border-radius: 999px; overflow: hidden; }
.timer__fill { height: 100%; background: #2f3fd6; width: 100%; transition: width 1s linear; }
.timer--low .timer__fill { background: #d97706; }
.timer--out .timer__fill { background: #dc2626; }

/* ------------------------------------------------------------------ ads */
.ad-slot {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; border: 1px dashed #d9d8d2; border-radius: 14px; background: #fbfbfa;
  padding: 1.25rem .75rem; overflow: hidden;
}
.ad-label {
  position: absolute; top: 6px; left: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #b6bac0;
}

/* ---------------------------------------------------------------- misc */
.field {
  width: 100%; border: 1px solid #d9d8d2; background: #fff; border-radius: 12px;
  padding: .6rem .75rem; font-size: 15px; color: #14161a;
}
.field:focus { outline: none; border-color: #2f3fd6; box-shadow: 0 0 0 3px #dfe3ff; }
:focus-visible { outline: 2px solid #2f3fd6; outline-offset: 2px; }
.tool-chip {
  border: 1px solid #e5e4df; background: #fff; border-radius: 999px;
  padding: .35rem .7rem; font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.tool-chip:hover { border-color: #9ba5fa; color: #2530a9; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.stars button { font-size: 30px; line-height: 1; color: #d9d8d2; }
.stars button.is-on { color: #f59e0b; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
