@import url('flashcards.css');

/* Full-viewport host that replaces the original app's Bootstrap modal shell.
   The board/card sizing in flashcards.css is vh/vw based, so it needs a
   light-blue, full-height container to live in. */
html,
body {
  margin: 0;
  height: 100%;
  background-color: #cfe2f3;
  overflow-x: hidden;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* --- Setup screen (where the user enters Swedish words) ------------------ */

.setup-screen {
  width: min(90vw, 500px);
  margin: auto;
  padding: 2em 0;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.setup-screen h1 {
  text-align: center;
  color: #1a4d7a;
  margin: 0 0 0.25em;
}

.setup-screen .hint {
  color: #1a4d7a;
  font-size: 0.9em;
  margin: 0;
}

.setup-screen textarea {
  width: 100%;
  min-height: 9em;
  resize: vertical;
}

.setup-error {
  color: #b00020;
  min-height: 1.2em;
  font-size: 0.9em;
}

.saved-lists {
  margin-top: 1em;
  border-top: 1px solid #a9c7e0;
  padding-top: 1em;
}

.saved-lists h2 {
  font-size: 1.1em;
  color: #1a4d7a;
  margin: 0 0 0.5em;
}

.saved-lists-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.saved-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

.saved-load {
  text-align: left;
  padding: 0.15em 0;
  text-decoration: none;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Word-list view ------------------------------------------------------ */

.wordlist-view {
  width: min(92vw, 640px);
  margin: 0 auto;
  padding: 1em 0 3em;
}

.wordlist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  margin-bottom: 0.75em;
}

.wordlist-toolbar h2 {
  margin: 0;
  color: #1a4d7a;
  font-size: 1.3em;
}

.wordlist-actions {
  display: flex;
  gap: 0.5em;
}

.wordlist-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wordlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 0.5em 0.25em;
  border-bottom: 1px solid #a9c7e0;
}

.wordlist-swedish {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: #1a4d7a;
}

.wordlist-native {
  color: #333;
  text-align: right;
}

.wordlist-speak {
  cursor: pointer;
  border: none;
  background: transparent;
  color: #0a7a55;
  font-size: 1.3em;
  line-height: 1;
  padding: 0 0.3em;
}

.wordlist-speak:hover {
  color: #086644;
}

.wordlist-speak:disabled {
  color: #bbb;
  cursor: default;
}

/* Plain buttons that don't inherit the flashcard .btn-primary sizing. */
.wl-btn {
  cursor: pointer;
  border: none;
  border-radius: 0.4em;
  padding: 0.4em 1em;
  font-size: 1em;
  font-weight: 600;
}

.wl-btn-primary {
  background: #1a6fb5;
  color: #fff;
}

.wl-btn-primary:hover {
  background: #155a93;
}

.wl-btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.wl-btn-secondary:hover {
  background: #d0d0d0;
}

a.index-create {
  display: inline-block;
  text-decoration: none;
  margin-top: 0.5em;
}

/* --- Game / start screen ------------------------------------------------- */

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  background-color: #cfe2f3;
}

.start-button {
  width: auto;
  height: auto;
  padding: 0.3em 2em;
}

.flashcardstts-lang-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.flashcardstts-lang-row label {
  margin: 0;
  font-weight: 600;
}

.flashcardstts-lang {
  width: auto;
  min-width: 12em;
}

.flashcardstts-lang-status {
  min-height: 1.2em;
  color: #1a4d7a;
  font-size: 0.9em;
}

/* The game lives inside #game, which takes the full viewport once started. */
#game {
  position: relative;
  width: 100vw;
  min-height: 100vh;
}
