/* Extra styling for the Knowledge page
   Works together with quiz-common.css */

/* Πιο "γεμάτο" μπλε header μόνο σε αυτή τη σελίδα */
.header {
  padding: 24px 28px;           /* περισσότερο από το default 16px 24px */
}

/* Layout inside the exam-style .container */
.kb-container {
  max-width: 600px;
  padding-top: 26px;            /* να κατέβει λίγο όλο το περιεχόμενο */
  padding-bottom: 20px;
}

/* Top bar: search LEFT, back button RIGHT */
.kb-top-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

/* Search block on the left */
.kb-search-block {
  flex: 1 1 260px;
  max-width: 420px;
}

.kb-search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.kb-search-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d4d9e3;
  font: inherit;
  box-sizing: border-box;
}

.kb-search-input:focus {
  outline: none;
  border-color: #003366;
}

.kb-search-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

/* Back button on the right */
.kb-actions {
  display: flex;
  align-items: center;
  margin-top: 10px;             /* για να κατέβει λίγο πιο κάτω από το search */
}

/* ΑΦΑΙΡΟΥΜΕ underline σε ΟΛΕΣ τις καταστάσεις (+ override με !important) */
.kb-back-link,
.kb-back-link:link,
.kb-back-link:visited,
.kb-back-link:hover,
.kb-back-link:active {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Accordion container */
.kb-accordion {
  border-radius: 8px;
  border: 1px solid #dde1e7;
  overflow: hidden;
}

/* One section per letter */
.kb-section + .kb-section {
  border-top: 1px solid #dde1e7;
}

/* Header button of each section */
.kb-section-header {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #f5f7fb;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
}

.kb-section-header:hover {
  background: #e7ecf8;
}

/* Letter badge (A, B, C...) */
.kb-section-label {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #c4ccda;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* Title text inside the header */
.kb-section-title {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

/* + / – icon */
.kb-section-indicator {
  font-weight: 700;
  font-size: 16px;
}

/* Body of each section (entries) */
.kb-section-body {
  padding: 8px 12px 10px;
  background: #ffffff;
}

/* Each abbreviation entry */
.kb-entry + .kb-entry {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e0e3ec;
}

.kb-term {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.kb-definition {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

/* Highlight entries when there is a search match */
.kb-entry.highlight {
  background: #fffbe6;
}

/* No results text */
.kb-no-results {
font-size: 13px;
color: #666;
text-align: center;
background-color: rgb(255, 217, 217);
padding: 10px;
margin: auto;
margin-top: 20px;
max-width: 50%;
border-radius: 8px;
font-weight: bold;
}

/* Small note at the bottom of the index card */
.index-footer-note {
  margin-top: 18px;
  font-size: 11px;
  color: #777;
  text-align: center;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .kb-top-bar {
    display: flex;
    flex-direction: row;         /* side-by-side even on mobile */
    justify-content: space-between;
    align-items: center;         /* vertically aligned */
    gap: 10px;
  }

  .kb-search-block {
    flex: 1 1 auto;              /* search takes remaining width */
    max-width: unset;
  }

  .kb-actions {
    flex: 0 0 auto;              /* back button stays at right */
    margin-top: 0;
  }

  .kb-container {
    max-width: 480px;
    margin: 0 auto;          /* center it */
    margin-top: 40px;
    margin-bottom: 40px;
  }
}