/* Shared styles for the Idioms and Proverbs flashcard pages. */
:root {
  --ink: #1a2e22;
  --paper: #F6F8F4;
  --card: #ffffff;
  --line: rgba(60,110,80,0.16);
  --moss: #010370;
  --moss-dark: #000A52;
  --clay: #c15f3c;
  --good: #2f7a4f;
  --good-bg: #e9f5ee;
  --bad: #b4453a;
  --bad-bg: #fbebe9;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--card);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lr-header {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.lr-header-logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.lr-header-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.lr-header-eyebrow {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 600;
}
.lr-header-title { font-size: 14px; font-weight: 700; }
.lr-header-progress { font-size: 12px; color: #6b7a76; font-weight: 500; }
.lr-header-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--moss-dark);
  text-decoration: none;
}
.lr-header-back:hover { text-decoration: underline; }

/* Card area fills the rest of the viewport: 66% image on the left,
   33% stacked cards on the right. */
#eq-app {
  flex: 1;
  display: flex;
  min-height: 0;
}

.eq-stage {
  flex: 1;
  display: flex;
  min-height: 0;
  width: 100%;
  padding: 20px;
  gap: 20px;
}

.eq-image-col {
  flex: 0 0 66%;
  position: relative;
  min-height: 0;
  background: #eef2ec;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.eq-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Reveal-block grid: a layer of logo tiles sitting over the picture
   that fall away one by one until the full picture is revealed. */
.eq-reveal-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.eq-reveal-block {
  background: var(--moss);
  border: 1px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.eq-reveal-logo-chip {
  width: 78%;
  max-width: 130px;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.eq-reveal-block img {
  width: 100%;
  height: auto;
  display: block;
}
.eq-reveal-block.is-gone {
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.eq-side-col {
  flex: 0 0 34%;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--card);
}

.eq-round-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--moss-dark);
  text-align: center;
  margin: 0 0 16px;
}

.eq-card {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eq-explanation-placeholder {
  font-size: 14px;
  color: #6b7a76;
  text-align: center;
  margin: 0;
}
.eq-meaning-upfront {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  text-align: center;
}
.eq-example {
  font-size: 14px;
  font-style: italic;
  color: #6b7a76;
  margin: 8px 0 0;
}
.eq-example-upfront {
  text-align: center;
}
.eq-feedback-heading {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}
.eq-good { color: var(--good); }
.eq-bad { color: var(--bad); }

@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; overflow: visible; }
  #eq-app { min-height: 0; }
  .eq-stage { flex-direction: column; }
  .eq-image-col { flex: 0 0 260px; }
  .eq-side-col {
    flex: 1 1 auto;
    overflow-y: visible;
    min-height: 0;
  }
  .eq-card {
    flex: 0 0 auto;
    overflow-y: visible;
    justify-content: flex-start;
  }
}

.eq-opts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eq-opt-btn {
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.eq-opt-btn:hover:not(:disabled) { border-color: var(--moss); }
.eq-opt-btn:disabled { cursor: default; }
.eq-opt-btn.eq-correct { background: var(--good-bg); border-color: var(--good); }
.eq-opt-btn.eq-incorrect { background: var(--bad-bg); border-color: var(--bad); }

.eq-answer-row {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
}
.eq-answer-input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.eq-answer-input:focus { outline: none; border-color: var(--moss); }
.eq-answer-input:disabled { opacity: 0.7; }

.eq-mic-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
}
.eq-mic-btn:hover { border-color: var(--moss); }
.eq-mic-btn.eq-mic-listening { background: var(--moss); border-color: var(--moss); }

.eq-submit-btn {
  width: 100%;
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--moss);
  color: #fff;
  cursor: pointer;
}
.eq-submit-btn:disabled { opacity: 0.6; cursor: default; }
.eq-submit-btn:hover:not(:disabled) { background: var(--moss-dark); }

.eq-feedback {
  width: 100%;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.eq-feedback.eq-good { color: var(--good); }
.eq-feedback.eq-bad { color: var(--bad); }
.eq-meaning {
  display: block;
  margin-top: 4px;
  color: #6b7a76;
  font-weight: 400;
}
.eq-known-badge {
  margin-top: 10px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--good);
  background: var(--good-bg);
  padding: 6px 12px;
  border-radius: 999px;
}
.eq-continue-btn {
  display: block;
  margin-top: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  background: var(--moss);
  color: #fff;
  cursor: pointer;
}
.eq-continue-btn:hover { background: var(--moss-dark); }

.eq-locked-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 10px;
}
.eq-locked-icon { font-size: 40px; }
.eq-locked-screen h2 { font-size: 22px; margin: 4px 0 0; }
.eq-locked-screen p { font-size: 14px; color: #6b7a76; max-width: 380px; margin: 0 0 6px; }
.eq-upgrade-btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--moss);
  color: #fff;
  text-decoration: none;
}
.eq-upgrade-btn:hover { background: var(--moss-dark); }
.eq-back-link {
  font-size: 13px;
  color: var(--moss-dark);
  text-decoration: none;
  margin-top: 6px;
}
.eq-back-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .eq-stage { padding: 14px; gap: 14px; }
  .lr-header-title { font-size: 13px; }
}
