/* ============================================================
   EASY PEASY DICTEE — PREMIUM CLEAN RESPONSIVE UI
   ============================================================ */

/* ------------------------------------------------------------
   GLOBAL RESET & BASE
   ------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 1.4vw, 18px);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: url("../images/home/achtergrond.png") no-repeat center center
    fixed;
  background-size: cover;
  color: #033e8c;
}

/* ------------------------------------------------------------
   GRID LAYOUT
   ------------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  align-items: stretch;
}

/* Hide-mode → oefenpaneel fullscreen */
.hide-mode .grid {
  grid-template-columns: 1fr !important;
  max-width: 900px !important;
  padding: 10px !important;
}

.hide-mode .grid .panel:nth-of-type(2) {
  max-width: 100% !important;
  width: 100% !important;
}

/* Mobile layout */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr !important;
    padding: 12px;
    gap: 14px;
  }
}

/* ------------------------------------------------------------
   PANELS (general)
   ------------------------------------------------------------ */

.panel {
  background: white;
  border-radius: 16px;
  padding: clamp(12px, 2vw, 26px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Hide-mode verbergt keuzepanel */
.hide-panel {
  display: none !important;
}

/* ------------------------------------------------------------
   PANEL 1 (keuzepanel)
   ------------------------------------------------------------ */

.grid .panel:nth-of-type(1) {
  max-width: 350px;
  padding: clamp(10px, 2vw, 20px);
}

.grid .panel:nth-of-type(1) .content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Headings kleiner in keuzepaneel */
.grid .panel:nth-of-type(1) h2 {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  margin: 8px 0 2px 0;
}

/* Selects compact */
.grid .panel:nth-of-type(1) .select {
  background: #f8fbff;
  border: 2px solid #bcd3f1;
  border-radius: 8px;
  padding: clamp(4px, 0.8vw, 8px) clamp(6px, 1vw, 10px);
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  height: clamp(28px, 3vw, 36px);
  color: #033e8c;
}

.select:focus {
  outline: none;
  border-color: #4c8ce4;
  box-shadow: 0 0 6px rgba(76, 140, 228, 0.5);
}

/* Instellingen in 2 kolommen */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 6px;
  align-items: start;
}

.settings-grid > label {
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.2;
}

.settings-grid > label > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   PANEL 2 (oefenpaneel)
   ------------------------------------------------------------ */

.grid .panel:nth-of-type(2) {
  max-width: 760px;
}

/* ------------------------------------------------------------
   HEADINGS (general)
   ------------------------------------------------------------ */

h2 {
  margin: 0;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  color: #033e8c;
}

.mt-20 {
  margin-top: 14px;
}

/* ------------------------------------------------------------
   DISPLAY AREA
   ------------------------------------------------------------ */

.display {
  width: 100%;
  min-height: clamp(80px, 12vw, 120px);
  background: #e0efff;
  border: 2px dashed #2563eb;
  border-radius: 12px;
  padding: clamp(10px, 3vw, 30px);
  font-size: clamp(1.3rem, 3.5vw, 2.4rem);
  text-align: center;
  color: #033e8c;
  display: flex;
  align-items: center;
  justify-content: center;
}

#prompt {
  height: 48px; /* vaste hoogte, werkt op alle smartphones */
  display: flex;
  align-items: center;
  padding: 0 12px; /* horizontale padding is ok, verandert geen hoogte */
  margin-bottom: 10px;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.2; /* vaste line-height voor stabiel gedrag */
  color: #555;
}

/* Prompt-box feedback styling (FR dictee) */
#promptText[data-kind="ok"] {
  color: #1f7a1f;
}

#promptText[data-kind="bad"] {
  color: #b42318;
}

#promptText[data-kind="skip"] {
  color: #8a4b00;
}

#promptText[data-kind="info"] {
  color: inherit;
}

/* ------------------------------------------------------------
   ANSWER FIELD
   ------------------------------------------------------------ */

.answerBlock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.answerRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#answer {
  background: #fef9c3;
  border: 2px solid #033e8c;
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  width: 100%;
  height: clamp(60px, 10vw, 80px);
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */

.btn {
  padding: clamp(6px, 1vw, 10px) clamp(10px, 2vw, 16px);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  transition: 0.2s ease;
}

.btn.primary {
  background: #2563eb;
  color: white;
}
.btn.primary:hover {
  background: #1e4fc4;
}

.btn.warn {
  background: #f59e0b;
  color: white;
}
.btn.warn:hover {
  background: #d97706;
}

.btn.danger {
  background: #dc2626;
  color: white;
}
.btn.danger:hover {
  background: #b91c1c;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.buttonRow {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   PILLBAR
   ------------------------------------------------------------ */

.pillbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: clamp(10px, 2vw, 16px) clamp(14px, 2vw, 20px);
  background: #d9f3f0;
  border-radius: 16px;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pill {
  padding: clamp(6px, 1vw, 10px) clamp(10px, 2vw, 20px);
  background: white;
  border-radius: 20px;
  font-weight: 600;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pill.good {
  background: #16a34a;
  color: white;
}

/* ------------------------------------------------------------
   REPORT PANEL
   ------------------------------------------------------------ */

.hidden {
  display: none !important;
}

#reportPanel {
  max-width: 1100px;
  margin: 20px auto;
  padding: clamp(16px, 2vw, 30px);
}

#reportPanel.hidden {
  display: none !important;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th {
  background: #2563eb;
  color: white;
  padding: clamp(8px, 1vw, 10px);
  font-size: clamp(0.75rem, 1.2vw, 1rem);
}

.table td {
  padding: clamp(6px, 1vw, 10px);
  border-bottom: 1px solid #e4e4e4;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
}

.table tr:hover td {
  background: #f3f8ff;
}

#lastMistakesPanel {
  margin: 12px 0;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 6px;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.footer {
  text-align: center;
  padding: 15px;
  color: #666;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
}

/* ruimte voor knoppen binnen rapportpaneel */
#reportPanel .btn {
  margin-right: clamp(8px, 1.5vw, 14px);
  margin-top: clamp(8px, 1.5vw, 12px);
}

/* ============================================================
   RESPONSIVE — DICTEE
============================================================ */

@media (max-width: 900px) {
  #woordenInput {
    font-size: 1rem;
  }

  #startBtn,
  #herhaalBtn,
  #stopBtn,
  #downloadBtn {
    width: 100%;
    margin-top: 8px;
  }

  .resultaat {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  #woordenInput {
    height: 160px;
    font-size: 0.95rem;
  }

  #antwoordInput {
    font-size: 1.1rem;
    padding: 12px;
  }

  #feedback {
    font-size: 0.9rem;
    padding: 8px;
  }

  .resultaat {
    font-size: 0.9rem;
  }

  #rapportPanel .panel {
    padding: 12px !important;
  }
}
