/* COSYlanguages placement assessment stylesheet */

main#main-content {
  padding-top: 100px !important;
}

.placement-container {
  max-width: 920px;
  margin: 2rem auto 3rem auto;
  padding: 2rem;
  background: var(--surface-color, #ffffff);
  color: var(--ink, #222222);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-top: 8px solid var(--sage-deep, #3d5a45);
  width: 92%;
}

.placement-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--sage-light, #faf7f2);
  color: var(--sage-deep, #3d5a45);
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.placement-title {
  font-family: var(--font-serif, serif);
  font-size: 2.2rem;
  color: var(--sage-dark, #2b3e30);
  text-align: center;
  margin-bottom: 0.5rem;
}

.placement-subtitle {
  text-align: center;
  color: var(--ink-soft, #555555);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Onboarding Modal & Selectors */
.onboarding-card {
  background: var(--surface-color);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.onboarding-section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--sage-deep);
  font-weight: 700;
  margin-bottom: 1rem;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.lang-option {
  background: var(--surface-color);
  border: 2px solid var(--border);
  color: var(--ink);
  border-radius: 12px;
  padding: 1rem .6rem;
  text-align: center;
  cursor: pointer;
  font-weight: 800;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  min-height: 48px;
}

.lang-option[data-lang="el"] { font-size: .95rem; }

.lang-option .lang-code {
  min-width: 0;
  padding: .2em .3em;
  font-size: .62em;
}

.lang-option:hover {
  border-color: var(--sage-deep, #3d5a45);
  transform: translateY(-2px);
}

.lang-option.selected {
  border-color: var(--cosy-color-sage-dark, #375742);
  background: var(--cosy-color-sage-dark, #375742);
  color: var(--cosy-on-sage-dark, #ffffff);
}

.mode-grid, .purpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mode-option-btn, .purpose-option-btn {
  background: var(--surface-color);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.mode-option-btn:hover, .purpose-option-btn:hover {
  border-color: var(--sage-deep);
  background: var(--sage-light);
}

.mode-option-btn.selected, .purpose-option-btn.selected {
  border-color: var(--sage-deep);
  background: var(--green-light, #e8f5e9);
  color: var(--sage-dark);
}

.mode-option-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.mode-option-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Question Cards & Options */
.question-card {
  display: block;
  animation: fadeIn 0.4s ease;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--sage-dark, #2b3e30);
  line-height: 1.5;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  display: block;
  width: 100%;
  background: var(--surface-color, #ffffff);
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 10px;
  padding: 1rem;
  text-align: left;
  font-weight: bold;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink, #222222);
  min-height: 48px;
}

.option-btn:hover {
  border-color: var(--sage-deep, #3d5a45);
  background: var(--cream-dark, #f5f0e6);
}

.option-btn.selected {
  border-color: var(--sage-deep, #3d5a45);
  background: var(--green-light, #e8f5e9);
  color: var(--cosy-ink-green, #2e7d32);
}

.option-btn.disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* Progress & Skill Threads */
.placement-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--cream-dark, #eee);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.placement-progress-fill {
  height: 100%;
  background: var(--honey-dark, #b7791f);
  width: 0%;
  transition: width 0.3s ease;
}

.skill-tabs-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.skill-tab-pill {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--cream-dark);
  color: var(--ink-soft);
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
}

.skill-tab-pill.active {
  background: var(--sage-deep);
  color: var(--cosy-on-brand);
}

.skill-tab-pill.completed {
  background: var(--green-light);
  color: var(--cosy-ink-green);
}

/* Question Types & Passage Display */
.reading-passage-box {
  background: var(--sage-light, #faf7f2);
  border-left: 4px solid var(--sage-deep);
  padding: 1.25rem;
  border-radius: 8px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-height: 250px;
  overflow-y: auto;
}

.writing-prompt-box {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.writing-textarea {
  width: 100%;
  min-height: 160px;
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  font-size: 1.05rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
}

.writing-textarea:focus {
  border-color: var(--sage-deep);
  outline: none;
}

/* Audio Recorder Component */
.cosy-audio-recorder {
  background: var(--surface-color);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.recorder-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.recorder-badge {
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.3rem 0.75rem;
  border-radius: 15px;
  background: var(--cream-dark);
}

.recorder-badge-recording {
  background: #ffebee;
  color: var(--cosy-ink-rose, #d32f2f);
}

.recorder-badge-stopped {
  background: var(--green-light);
  color: var(--cosy-ink-green);
}

.recorder-meter-container {
  width: 100%;
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.recorder-meter-bar {
  height: 100%;
  background: var(--sage-deep);
  width: 0%;
  transition: width 0.1s ease;
}

.recorder-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Results Dashboard */
.results-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.skill-result-card {
  background: var(--cream-dark);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.skill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--sage-deep);
  margin-bottom: 0.5rem;
}

.skill-card-band {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--ink);
}

.skill-card-confidence {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: var(--surface-color);
  border: 1px solid var(--border);
}

/* Action Buttons & Print */
.navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

/* Responsive Styles */
@media (max-width: 600px) {
  main#main-content {
    padding-top: 70px !important;
  }
  .placement-container {
    padding: 1.25rem 1rem;
    margin: 1rem auto 2rem auto;
    width: 95%;
  }
  .placement-title {
    font-size: 1.6rem;
  }
  .placement-subtitle {
    font-size: 0.95rem;
  }
  .onboarding-card {
    padding: 1rem;
  }
  .lang-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mode-grid, .purpose-grid {
    grid-template-columns: 1fr;
  }
  .navigation-bar {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  .navigation-bar .btn {
    width: 100%;
  }
}

@media print {
  nav, footer, .navigation-bar, .btn {
    display: none !important;
  }
  .placement-container {
    box-shadow: none;
    border: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }
}
