/* ================================
   GLOBAL BASE
================================ */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
  background: #eef2f6;
  color: #1a1a1a;
}

/* ================================
   HEADER (TIMER BAR)
================================ */
.ibps-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, #56e38c, #e8b90e);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  box-sizing: border-box;
  height: 52px; /* fixed so .ibps-palette-top's sticky offset stays accurate */
}

.ibps-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.ibps-header-logo {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.ibps2-quiz-lang-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.ibps2-lang-select {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #d5dae1;
  border-radius: 6px;
  padding: 5px 8px;
  background: #fafbfc;
  color: #1a1a1a;
}

.ibps-msg.error {
  color: #c62828;
  font-weight: 600;
}

#ibps2-timer {
  font-size: 15px;
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 6px;
}

/* ================================
   PALETTE (TOP – CBT STYLE)
================================ */
.ibps-palette-top {
  position: sticky;
  top: 52px;
  z-index: 90;
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  overflow-x: auto;
  border-bottom: 1px solid #ddd;
}

.pal-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 1px solid #bbb;
  background: #f2f2f2;
  color: #333;
}

/* Palette states */
.pal-btn.answered {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}

.pal-btn.marked {
  background: #f9a825;
  color: #000;
  border-color: #f9a825;
}

.pal-btn.visited {
  background: #90caf9;
  color: #000;
}

.pal-btn.not-visited {
  background: #e0e0e0;
}

/* ================================
   QUESTION AREA
================================ */
.ibps-question-area {
  padding: 18px 16px 80px;
}

.qtext {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ================================
   OPTIONS
================================ */
.option {
  border: 1px solid #cfd8dc;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  background: #f5f9ff;
  border-color: #1f3c88;
}

.option.selected {
  background: #e3f2fd;
  border-color: #1f3c88;
  box-shadow: 0 0 0 1px #1f3c88 inset;
}

/* ================================
   BOTTOM ACTION BAR
================================ */
.ibps-bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #d0d0d0;
}

.ibps-bottom-bar button {
  flex: 1;
  padding: 14px 10px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

/* Buttons */
.ibps-bottom-bar button:nth-child(1) {
  background: #eeeeee;
  color: #333;
}

.ibps-bottom-bar button:nth-child(2) {
  background: #fff3cd;
  color: #8a6d3b;
}

.ibps-bottom-bar .primary {
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
}

.ibps-bottom-bar .danger {
  background: linear-gradient(135deg, #c62828, #e53935);
  color: #fff;
}

/* ================================
   RESULT PAGE (GREEN / RED)
================================ */
.result-box h2 {
  text-align: center;
  color: #1f3c88;
}

.result-q {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.result-q .ua {
  color: #c62828;
  font-weight: 600;
}

.result-q .ca {
  color: #2e7d32;
  font-weight: 600;
}

.result-q .exp {
  background: #f5f7fa;
  padding: 10px;
  border-radius: 6px;
  margin-top: 8px;
}

/* ================================
   MOBILE OPTIMIZATION
================================ */
@media (max-width: 768px) {
  .qtext {
    font-size: 15px;
  }

  .ibps-bottom-bar button {
    font-size: 13px;
    padding: 12px 8px;
  }
}
/* ===== Result Review Options ===== */
.res-option {
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: #fafafa;
}

.res-option.correct {
  background: #e6f4ea;
  border-color: #2e7d32;
  color: #2e7d32;
  font-weight: 600;
}

.res-option.wrong {
  background: #fdecea;
  border-color: #c62828;
  color: #c62828;
  font-weight: 600;
}
/* ================================
   RESULT SUMMARY BOX
================================ */
.result-summary {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.sum-card {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
}

.sum-num {
  font-size: 22px;
  margin-bottom: 4px;
}

.sum-card.correct {
  background: #e6f4ea;
  color: #2e7d32;
}

.sum-card.wrong {
  background: #fdecea;
  color: #c62828;
}

.sum-card.unattempted {
  background: #f1f3f4;
  color: #555;
}

/* ================================
   RESULT FILTERS (All / Wrong Only / Marked for Review)
================================ */
.ibps2-result-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 20px;
}

.ibps2-filter-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #d5dae1;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ibps2-filter-btn.active {
  background: #1f3c88;
  border-color: #1f3c88;
  color: #fff;
}

.marked-tag {
  display: inline-block;
  background: #fff3cd;
  color: #8a6d3b;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.ibps2-result-lang-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 13px;
  color: #1f3c88;
  font-weight: 600;
}

.ibps2-result-lang-bar select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d5dae1;
  background: #fff;
  color: #333;
  font-size: 13px;
}

.ibps2-result-test-label {
  display: inline-block;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  margin: 14px 0 6px;
}
/* ================================
   RESULT TITLE & SCORE UI
================================ */
.result-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1f3c88;
  margin-bottom: 12px;
}

.score-card {
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
  text-align: center;
  padding: 18px;
  border-radius: 14px;
  margin: 15px 0 25px;
}

.score-label {
  font-size: 14px;
  opacity: 0.9;
}

.score-value {
  font-size: 34px;
  font-weight: 800;
  margin-top: 6px;
}

/* ================================
   LOGIN FOOTER (shown wherever a saved login was used automatically)
================================ */
.ibps2-login-footer {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  background: #f5f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
}

.ibps2-subscribe-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.3);
}

.ibps2-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #25d366, #128c4a);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(18, 140, 74, 0.3);
}

.ibps2-whatsapp-btn::before {
  content: '💬';
}

.ibps2-register-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(31, 60, 136, 0.3);
}

.ibps2-register-btn::before {
  content: '📝';
}

.ibps2-profile-details {
  text-align: left;
  margin-bottom: 16px;
}

.ibps2-profile-details h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: #333;
}

.ibps2-profile-details p {
  margin: 8px 0;
  font-size: 14px;
  color: #444;
}

.ibps2-profile-payment-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}

.ibps2-profile-payment-status.is-paid {
  background: #e8f5e9;
  color: #2e7d32;
}

.ibps2-profile-payment-status.is-unpaid {
  background: #fdecea;
  color: #c62828;
}

.ibps2-device-details {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f5f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
}

.ibps2-device-details p {
  margin: 4px 0;
}

.ibps2-device-reason-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.ibps2-device-reason-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d5dae1;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ibps2-device-reason-btn:hover {
  border-color: #1f3c88;
  background: #f5f7fd;
}

#ibps2-device-reason-other-box {
  margin-top: 10px;
}

#ibps2-device-reason-other-text {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d5dae1;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.ibps2-device-reason-submit {
  margin-top: 8px;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  border-color: transparent;
  color: #fff;
  text-align: center;
}

/* ================================
   MODERN NOTICE MODAL (replaces browser alert())
================================ */
.ibps2-notice-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.ibps2-notice-box {
  background: #fff;
  border-radius: 14px;
  padding: 24px 22px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: ibps2-notice-pop 0.15s ease;
}

@keyframes ibps2-notice-pop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ibps2-notice-box p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.ibps2-notice-box.ibps2-notice-warning p {
  color: #92400e;
}

.ibps2-notice-close {
  border: none;
  padding: 11px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.ibps2-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ibps2-notice-action-btn {
  flex: 1;
  min-width: 120px;
  border: 1px solid #d5dae1;
  padding: 11px 18px;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.ibps2-notice-action-btn:hover {
  background: #f5f7fa;
}

.ibps2-notice-action-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
}

.ibps2-notice-action-primary:hover {
  opacity: 0.92;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
}

.ibps2-protected,
.ibps2-protected * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.ibps2-scale-banner {
  display: block;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 14px;
}

.ibps2-scale-banner-link {
  display: block;
}

/* ================================
   REGISTRATION FORM (amber theme)
================================ */
.ibps2-reg-card {
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(160deg, #fffaf0 0%, #ffe9c7 100%);
  border: 1px solid #f3d9a4;
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 10px 30px rgba(180, 83, 9, 0.12);
}

.ibps2-card-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin: 0 auto 18px;
  border-radius: 10px;
}

.ibps2-reg-card h2 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 800;
  color: #92400e;
}

.ibps2-reg-sub {
  margin: 0 0 20px;
  color: #a16207;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.ibps2-reg-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: #78350f;
}

.ibps2-reg-card input,
.ibps2-reg-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #eed3a0;
  border-radius: 12px;
  font-size: 15px;
  background: #fffdf8;
  color: #3a2a12;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ibps2-reg-card select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b45309'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 36px;
}

.ibps2-reg-card input:focus,
.ibps2-reg-card select:focus {
  outline: none;
  border-color: #d97706;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.ibps2-reg-card small {
  display: block;
  margin-top: 4px;
  color: #a16207;
  font-size: 12px;
}

.ibps2-reg-btn {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.3);
}

.ibps2-reg-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.ibps2-reg-privacy {
  margin-top: 14px;
  font-size: 11px;
  color: #b45309;
  text-align: center;
}

#ibps2-reg-success {
  text-align: center;
  padding: 28px 0;
}

#ibps2-reg-success h2 {
  color: #92400e;
}

@media (max-width: 480px) {
  .ibps2-reg-card {
    max-width: 100%;
    border-radius: 14px;
    padding: 22px 16px;
  }

  .ibps2-reg-card input,
  .ibps2-reg-card select {
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
  }
}

/* ================================
   NOTICE BOARD
================================ */
#ibps2-notice-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.ibps2-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ibps2-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.4;
}

.ibps2-notice-text {
  flex: 1;
  min-width: 0;
}

.ibps2-notice-dismiss {
  flex-shrink: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0 2px;
}

.ibps2-notice-dismiss:hover {
  opacity: 1;
}

.ibps2-notice-info {
  background: #eef2ff;
  border-left-color: #3730a3;
  color: #312e81;
}

.ibps2-notice-success {
  background: #e6f4ea;
  border-left-color: #2e7d32;
  color: #1b5e20;
}

.ibps2-notice-warning {
  background: #fff8e1;
  border-left-color: #b45309;
  color: #7c4a03;
}

.ibps2-notice-urgent {
  background: #fdecea;
  border-left-color: #c62828;
  color: #8e1c1c;
}

/* ================================
   CONTENT TREE BROWSER (Topic > Subtopic > Quiz/PDF)
================================ */
#ibps2-content-app {
  max-width: 720px;
  margin: 0 auto;
}

.ibps2-content-lang-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #92400e;
  font-weight: 600;
}

.ibps2-content-lang-bar select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #eed3a0;
  background: #fff;
  color: #3a2a12;
  font-size: 13px;
}

.ibps2-content-search {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 160px;
}

.ibps2-content-search input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #eed3a0;
  background: #fff;
  color: #3a2a12;
  font-size: 13px;
  font-weight: 400;
}

.ibps2-content-search input:focus {
  outline: none;
  border-color: #d97706;
}

.ibps2-content-search button {
  flex-shrink: 0;
  border: 1px solid #eed3a0;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

.ibps2-content-search button:hover {
  background: #fffaf0;
}

.ibps2-content-search-count {
  font-size: 12px;
  color: #92400e;
  margin: 0 0 12px;
}

#ibps2-content-search-clear {
  margin-left: 6px;
  border: none;
  background: none;
  color: #1f3c88;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.ibps2-content-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f0e2c0;
}

.ibps2-quicklink-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eed3a0;
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ibps2-quicklink-btn:hover {
  background: #fffaf0;
  border-color: #d97706;
}

.ibps2-quicklink-icon {
  position: relative;
  font-size: 16px;
  line-height: 1;
}

.ibps2-quicklink-label {
  line-height: 1;
}

/* A gentle "worth doing" nudge on Register, without being obnoxious. */
.ibps2-quicklink-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  border: 1.5px solid #fff;
}

.ibps2-quicklink-login,
.ibps2-quicklink-register {
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  border-color: transparent;
  color: #fff;
}

.ibps2-quicklink-login:hover,
.ibps2-quicklink-register:hover {
  opacity: 0.92;
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
}

.ibps2-quicklink-dashboard {
  background: #fef3e2;
  border-color: #f5d59e;
  color: #92400e;
}

.ibps2-quicklink-review {
  background: #f3e8ff;
  border-color: #ddd0f5;
  color: #6d28d9;
}

.ibps2-quicklink-dashboard:hover {
  background: #fce8c6;
}

.ibps2-quicklink-review:hover {
  background: #ead9ff;
}

/* ================================
   MOBILE: sticky bottom app-style tab bar
================================ */
@media (max-width: 640px) {
  body.ibps2-has-quicklinks-bar {
    padding-bottom: 78px;
  }

  .ibps2-content-quicklinks {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    margin: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
    border-radius: 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.09);
    justify-content: space-around;
    gap: 2px;
  }

  .ibps2-quicklink-btn {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 6px 2px;
    border: none;
    background: transparent !important;
    color: #6b4a1e;
    text-align: center;
    border-radius: 10px;
  }

  .ibps2-quicklink-login,
  .ibps2-quicklink-register {
    color: #1f3c88;
  }

  .ibps2-quicklink-dashboard,
  .ibps2-quicklink-review {
    background: transparent !important;
  }

  .ibps2-quicklink-dashboard {
    color: #b45309;
  }

  .ibps2-quicklink-review {
    color: #6d28d9;
  }

  /* Same light-tint highlight as desktop, just applied to a small
     rounded pill behind the icon+label instead of the whole bar item. */
  .ibps2-quicklink-dashboard .ibps2-quicklink-icon,
  .ibps2-quicklink-review .ibps2-quicklink-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 26px;
    border-radius: 8px;
  }

  .ibps2-quicklink-dashboard .ibps2-quicklink-icon {
    background: #fef3e2;
  }

  .ibps2-quicklink-review .ibps2-quicklink-icon {
    background: #f3e8ff;
  }

  .ibps2-quicklink-btn:hover,
  .ibps2-quicklink-btn:active {
    background: #fff8ea !important;
  }

  .ibps2-quicklink-icon {
    font-size: 21px;
  }

  .ibps2-quicklink-label {
    font-size: 10px;
    font-weight: 700;
  }
}

.ibps2-user-scale-info {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  opacity: 0.8;
}

.ibps2-user-scale-info.ibps2-scale-mismatch {
  color: #c62828;
  opacity: 1;
  background: #fdecea;
  padding: 4px 10px;
  border-radius: 8px;
}

.ibps2-scale-update-btn {
  margin-left: 6px;
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #c62828, #e53935);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}

.ibps2-scale-update-btn:hover {
  opacity: 0.9;
}

.ibps2-content-progress {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  margin-left: 6px;
  white-space: nowrap;
}

.ibps2-content-progress.done {
  color: #2e7d32;
}

.ibps2-content-progress:empty {
  display: none;
}

.ibps2-content-folder {
  background: #fffaf0;
  border: 1px solid #f3d9a4;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.06);
  transition: box-shadow 0.15s ease;
}

.ibps2-content-folder[open] {
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.12);
}

.ibps2-content-folder .ibps2-content-folder {
  background: #fffdf7;
  border-color: #f0e2c0;
  margin: 8px 6px 8px;
  box-shadow: none;
}

.ibps2-content-folder-title {
  cursor: pointer;
  list-style: none;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.ibps2-content-folder[open] > .ibps2-content-folder-title {
  border-bottom-color: #f3d9a4;
}

.ibps2-content-folder-title::-webkit-details-marker {
  display: none;
}

.ibps2-content-folder-title::after {
  content: '⌄';
  margin-left: auto;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.ibps2-content-folder[open] > .ibps2-content-folder-title::after {
  transform: rotate(180deg);
}

.ibps2-content-children {
  padding: 8px 8px 10px;
}

.ibps2-content-empty {
  color: #a16207;
  font-size: 13px;
  margin: 0 0 10px;
}

.ibps2-content-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.ibps2-content-icon-img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.ibps2-content-title-text {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
  word-break: break-word;
}

.ibps2-content-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 10px 10px;
  margin-bottom: 6px;
  border: 1px solid #eed3a0;
  border-radius: 8px;
  background: #fff;
  color: #3a2a12;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ibps2-content-item:hover {
  border-color: #d97706;
  background: #fffaf0;
}

.ibps2-content-item:active {
  transform: scale(0.98);
}

/* Distinct light-tint per content type, so Quiz/PDF/URL/Video are
   visually distinguishable in the list at a glance, not just by icon. */
.ibps2-content-item[data-type="quiz"] {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.ibps2-content-item[data-type="quiz"]:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.ibps2-content-item[data-type="pdf"] {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.ibps2-content-item[data-type="pdf"]:hover {
  background: #dcedde;
  border-color: #81c784;
}

.ibps2-content-item[data-type="url"] {
  background: #f3e8ff;
  border-color: #ddd0f5;
}

.ibps2-content-item[data-type="url"]:hover {
  background: #ead9ff;
  border-color: #c9aef0;
}

.ibps2-content-item[data-type="youtube"] {
  background: #fee2e2;
  border-color: #fca5a5;
}

.ibps2-content-item[data-type="youtube"]:hover {
  background: #fdd2d2;
  border-color: #f78787;
}

@media (max-width: 380px) {
  .ibps2-content-folder-title,
  .ibps2-content-item {
    font-size: 13px;
    padding: 9px 8px;
    gap: 5px;
  }

  .ibps2-content-icon {
    font-size: 14px;
  }

  .ibps2-content-icon-img {
    width: 14px;
    height: 14px;
  }
}

.ibps2-content-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid #eed3a0;
  border-radius: 10px;
  background: #fff;
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.ibps2-content-back-btn:hover {
  background: #fffaf0;
}

/* ================================
   RESULT REVIEW CARD
================================ */
.ibps2-review-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 8px 28px rgba(31, 60, 136, 0.08);
}

.ibps2-review-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #1f3c88;
}

.ibps2-review-sub {
  margin: 0 0 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.ibps2-review-card input,
.ibps2-review-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d5dae1;
  border-radius: 10px;
  font-size: 15px;
  background: #fafbfc;
}

.ibps2-review-card input:focus,
.ibps2-review-card select:focus {
  outline: none;
  border-color: #1f3c88;
  background: #fff;
}

.ibps2-review-btn-primary,
.ibps2-review-btn-secondary {
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.ibps2-review-btn-primary {
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
}

.ibps2-review-btn-secondary {
  background: #eef1f6;
  color: #1f3c88;
}

.ibps2-review-btn-outline {
  background: #fff;
  border: 2px solid #1f3c88;
  color: #1f3c88;
}

.ibps2-review-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 16px 0;
}

.ibps2-review-divider::before,
.ibps2-review-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}

.ibps2-review-divider span {
  padding: 0 10px;
}

.ibps2-review-msg {
  color: #c62828;
  font-size: 13px;
  margin-top: 10px;
  min-height: 1em;
}

@media (max-width: 480px) {
  .ibps2-review-card {
    max-width: 100%;
    border-radius: 12px;
    padding: 20px 16px;
  }

  .ibps2-review-card input,
  .ibps2-review-card select {
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
  }
}

/* ================================
   WHATSAPP COMMUNITY BAR (Dashboard + Result Review)
================================ */
.ibps2-community-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #e5e5e5;
}

.ibps2-community-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.ibps2-community-icon {
  font-size: 16px;
  line-height: 1;
}

.ibps2-community-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c4a);
  color: #fff;
}

.ibps2-community-whatsapp:hover {
  opacity: 0.92;
}

.ibps2-community-share {
  background: linear-gradient(135deg, #1f3c88, #2b55c7);
  color: #fff;
}

.ibps2-community-share:hover {
  opacity: 0.92;
}

.ibps2-translating-indicator {
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  margin-left: 6px;
  white-space: nowrap;
}

/* ================================
   FULL-SCREEN PDF VIEWER (same tab, no native download prompt)
================================ */
.ibps2-pdf-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: #525659;
  display: flex;
  flex-direction: column;
}

body.ibps2-pdf-fullscreen-open {
  overflow: hidden;
}

.ibps2-pdf-fullscreen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: linear-gradient(135deg, #fff3e0, #ffe0a3);
  border-bottom: 1px solid #f0d190;
  color: #92400e;
  flex-shrink: 0;
}

.ibps2-pdf-fullscreen-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ibps2-pdf-fullscreen-download,
.ibps2-pdf-fullscreen-newtab,
#ibps2-pdf-fullscreen-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(146, 64, 14, 0.1);
  border: none;
  color: #92400e;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.ibps2-pdf-fullscreen-download:hover,
.ibps2-pdf-fullscreen-newtab:hover,
#ibps2-pdf-fullscreen-close:hover {
  background: rgba(146, 64, 14, 0.2);
}

.ibps2-pdf-fullscreen-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* ================================
   INLINE YOUTUBE VIDEO
================================ */
#ibps2-youtube-title {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 14px;
}

.ibps2-youtube-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.ibps2-youtube-frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================
   EXAM LEVEL PICKER (first visit, shared/generic content page)
================================ */
.ibps2-exam-level-picker {
  text-align: center;
  padding: 30px 16px;
}

.ibps2-exam-level-picker h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  color: #92400e;
}

.ibps2-exam-level-picker p {
  margin: 0 0 20px;
  color: #a16207;
  font-size: 13px;
}

.ibps2-exam-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.ibps2-exam-level-btn {
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid #eed3a0;
  background: #fff;
  color: #92400e;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ibps2-exam-level-btn:hover {
  background: #fffaf0;
  border-color: #d97706;
}

.ibps2-exam-level-btn:active {
  transform: scale(0.97);
}
