/*
 Theme Name: GeneratePress Child
 Theme URI: https://acemexam.com
 Description: Child theme for GeneratePress
 Author: abban
 Template: generatepress
 Version: 1.3
*/
/* Auto-expanding textareas for multiline SAQ responses */
textarea.expand-box {
  width: 100%;
  resize: none;
  padding: 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  font-family: inherit;
  overflow: hidden;
  min-height: 2.2em;
  box-sizing: border-box;
}
/* SAQ Topic Grid Styles */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.topic-card {
  display: block;
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}

.topic-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.topic-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #222;
}

.topic-card p {
  margin: 8px 0 0;
  color: #666;
  font-size: 0.95rem;
}
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tag-card {
  display: block;
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}

.tag-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tag-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #222;
}

.tag-card p {
  margin: 8px 0 0;
  color: #666;
  font-size: 0.95rem;
}
.exam-nav-buttons {
  display: grid;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}
.qnbutton.current-saq {
  box-shadow: inset 0 0 0 2px black;
  border-radius: 6px;
}
.qnbutton {
  display: inline-block;
  aspect-ratio: 1 / 1;              /* Makes it square */
  width: 20%;     
  text-align: center;
  font-weight: bold;
  border-radius: 4px;
  background-color: white;
  color: black;
  text-decoration: none;
  font-size: 16px;
  border: 1px solid #ccc;
  transition: background-color 0.2s ease-in-out;
}

.qnbutton:hover {
  background-color: #cbd3da;
}

.qnbutton.thispage {
  background-color: white;
  color: black;
}

.qnbutton.btn-danger {
  background-color: #DC143C !important;
  color: black !important;
  border-color: #white !important;
}

.qnbutton.btn-primary {
  background-color: #4682B4  !important;
  color: black!important;
  border-color: white !important;
}

.qnbutton.btn-secondary {
  background-color: white !important;
  color: black !important;
  border-color: #d6d8db !important;
}

.saq-archive-section,
.saq-topic-archive,
.saq-tag-archive {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.saq-card {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 18px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.saq-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  font-size: 0.94rem;
}

.saq-archive-actions {
  margin: -8px 0 22px;
}

.saq-archive-study-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 4px;
  background: #005f8a;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.saq-archive-loop--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.saq-archive-loop--grid .saq-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.saq-card.is-locked {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.saq-card__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.saq-card__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.saq-card__title a {
  color: #1f2937;
  text-decoration: none;
}

.saq-card__title a:hover {
  color: #005f8a;
  text-decoration: underline;
}

.saq-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 92px;
}

.saq-card .badge,
.saq-access-badge,
.saq-progress-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.78rem;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.3;
}

.saq-card .completed-badge,
.saq-card .review-badge {
  display: none;
  color: #ffffff;
}

.saq-card .completed-badge {
  background: #2f855a;
}

.saq-card .review-badge {
  background: #b7791f;
}

.saq-access-badge--locked {
  color: #475569;
  background: #e2e8f0;
}

.saq-access-badge--public {
  color: #0f766e;
  background: #ccfbf1;
}

.saq-progress-badge--completed {
  color: #ffffff;
  background: #2f855a;
}

.saq-progress-badge--review {
  color: #ffffff;
  background: #b7791f;
}

.saq-progress-badge--started {
  color: #1e3a8a;
  background: #dbeafe;
}

.saq-progress-badge--not_attempted,
.saq-progress-badge--not-attempted {
  color: #475569;
  background: #e2e8f0;
}

.saq-card__summary {
  color: #4b5563;
}

.saq-card__meta {
  color: #64748b;
  font-size: 0.92rem;
  margin: 6px 0 12px;
}

.saq-card__locked-actions {
  margin-top: 12px;
}

.saq-card__login-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 4px;
  background: #005f8a;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.saq-card__login-button:hover {
  background: #004766;
  color: #ffffff;
}

.saq-archive-study-button:hover {
  background: #004766;
  color: #ffffff;
}

@media (max-width: 640px) {
  .saq-card__header {
    display: block;
  }

  .saq-card__badges {
    justify-content: flex-start;
    margin-top: 8px;
  }
}
