.agq-answer-status-pending,
.agq-answer-status-completed {
  color: white;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  display: block;
  text-align: center;
  white-space: nowrap;
}

.agq-answer-status-pending {
  background: red;
  border: 1px solid red;
}

.agq-answer-status-completed {
  background: #2e7d32;
  border: 1px solid #2e7d32;
}

.agq-answer-container {
  width: 100%;
  overflow: auto;
}

.agq-answer-container .action-col {
  width: 7.2rem;
}

.agq-header-nav .agq-btn-back {
  text-decoration: underline !important;
}

.agq-header-nav h2 {
  font-size: 34px;
}

/* Modal Container */
.agq-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

/* Modal Content Box */
.agq-modal-content {
  background-color: #fff;
  width: 80%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 8px;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

.agq-modal-content p,
.agq-modal-content h3 {
  margin: 0;
}

.agq-modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agq-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.agq-modal-body {
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.agq-student-meta {
  padding-bottom: 10px;
}

.agq-student-meta-wrapper {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.agq-student-meta-wrapper p:first-child {
  font-weight: bold;
  width: 15%;
}

.agq-close-modal {
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
}

.agq-modal-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  gap: 20px;
}

/* Status Badge */
.agq-badge-correct,
.agq-badge-correct:hover,
.agq-badge-correct:focus,
.agq-badge-correct:active {
  color: #27ae60;
  font-weight: bold;
}

.agq-badge-wrong,
.agq-badge-wrong:hover,
.agq-badge-wrong:focus,
.agq-badge-wrong:active {
  color: #e74c3c;
  font-weight: bold;
}

.agq-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.agq-detail-table td {
  padding: 10px;
  border: 1px solid #eee;
  vertical-align: top;
}

/* Container tabel dengan scroll */
.agq-detail-table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  position: relative;
}

/* Membuat Header tetap di atas (Sticky) */
.agq-detail-table thead th {
  position: sticky;
  top: 0;
  background-color: #f1f1f1; /* Warna solid agar tidak transparan saat di-scroll */
  z-index: 2;
  padding: 12px 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar agar terlihat lebih modern */
.agq-detail-table-wrapper::-webkit-scrollbar {
  width: 8px;
}
.agq-detail-table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.agq-detail-table-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.agq-detail-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.agq-question-answer {
  text-align: center;
}

.agq-question-answer img {
  max-width: 250px;
}

/* Pewarnaan Baris Berdasarkan Status */
.agq-row-correct {
  background-color: #f0fff4; /* Hijau sangat muda */
}

.agq-row-wrong {
  background-color: #fff5f5; /* Merah sangat muda */
}

/* Hover effect agar baris yang disorot lebih jelas */
.agq-detail-table tbody tr:hover {
  filter: brightness(0.95);
}

.agq-correction-content-wrapper .agq-detail-table tbody tr:hover {
  filter: unset;
}

.agq-loading-spinner {
  display: flex;
  flex-direction: row;
  gap: 22px;
  align-items: baseline;
}

.agq-loading-spinner p {
  font-size: 18px;
}

/* Style Tombol Print di Modal */
.agq-btn-print {
  background: #2271b1;
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 15px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.agq-btn-print:hover {
  background: #135e96;
  color: white;
}

.agq-print-header {
  display: none;
}

.question-image-container {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.question-image-container img {
  width: 35%;
  height: 35%;
}

/* CSS KHUSUS PRINT */
@media print {
  /* Sembunyikan seluruh elemen website */
  body * {
    visibility: hidden;
  }

  /* Tampilkan hanya area modal body */
  #agq-modal-body,
  #agq-modal-body * {
    visibility: visible;
  }

  /* Posisikan konten yang akan dicetak di pojok kiri atas kertas */
  #agq-modal-body {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    margin: 20px;
  }

  .agq-print-header {
    display: block;
    margin-top: 20px;
    text-align: center;
  }

  /* Hilangkan scroll pada tabel saat cetak agar semua baris muncul */
  .agq-detail-table-wrapper {
    max-height: none !important;
    overflow: visible !important;
    max-width: 95%;
  }

  .agq-detail-table thead th {
    position: static !important; /* Hilangkan sticky saat print */
    background: #eee !important;
    color: black !important;
    border: 1px solid #ddd !important;
  }

  .agq-detail-table td {
    border: 1px solid #ddd !important;
  }
}

/* Styling for mobile */
@media (max-width: 480px) {
  .agq-answer-container .action-col {
    min-width: 120px;
  }

  .agq-answer-container .agq-table {
    width: calc(100% + 600px);
  }
}

@media (min-width: 667px) and (max-width: 667px) {
  .agq-answer-container .action-col {
    min-width: 120px;
  }

  .agq-answer-container .agq-table {
    width: calc(100% + 270px);
  }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .agq-answer-container .action-col {
    width: 16%;
  }
}

/* Styling for Tablet (iPad Air, iPad Mini, Pro 11-inch) */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .agq-answer-container .action-col {
    width: 12%;
  }
}
