/* MR.PHARMACIST — luxury focused examination experience.
   Visual layer only: no changes to exam data, timer, answers, navigation or submission. */

body:has(.mrph-exam-shell) .topbar {
  border-bottom: 1px solid rgba(13, 91, 111, .09);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(7, 40, 57, .055);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body:has(.mrph-exam-shell) .topbar .page-kicker {
  color: #0a7b88;
  font-size: 9px;
  letter-spacing: .18em;
}

body:has(.mrph-exam-shell) .topbar .page-title {
  max-width: min(900px, 72vw);
  overflow: hidden;
  color: #0b263a;
  font-size: clamp(20px, 2.35vw, 31px);
  font-weight: 830;
  line-height: 1.16;
  letter-spacing: -.028em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[dir="rtl"] body:has(.mrph-exam-shell) .topbar .page-title {
  letter-spacing: -.012em;
}

.mrph-exam-app:has(.mrph-exam-shell) {
  position: relative;
  padding: 4px 0 34px;
}

.mrph-exam-app:has(.mrph-exam-shell)::before {
  content: "";
  position: absolute;
  inset: -34px -34px auto;
  z-index: -1;
  height: 280px;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 8%, rgba(39,203,214,.13), transparent 19rem),
    radial-gradient(circle at 12% 0%, rgba(8,117,130,.075), transparent 17rem);
}

.mrph-exam-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 20px;
  align-items: start;
}

.mrph-exam-main,
.mrph-exam-side {
  border: 1px solid rgba(13, 91, 111, .11);
  border-radius: 27px;
  background: rgba(255,255,255,.985);
  box-shadow:
    0 28px 70px rgba(5, 37, 53, .095),
    0 2px 8px rgba(5, 37, 53, .035);
}

.mrph-exam-main {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.mrph-exam-main::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 240px;
  height: 110px;
  pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(79,226,232,.15), transparent 12rem);
}

.mrph-exam-toolbar {
  position: relative;
  z-index: 1;
  min-height: 94px;
  padding: 22px 26px;
  border-bottom: 0;
  color: #f4feff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 88% -15%, rgba(64,222,230,.34), transparent 15rem),
    linear-gradient(135deg, #031827 0%, #06364a 62%, #087582 100%);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.mrph-exam-progress-copy {
  position: relative;
  padding-inline-start: 17px;
}

.mrph-exam-progress-copy::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(#75edf1, #20b9c8);
  box-shadow: 0 0 18px rgba(72,221,228,.55);
}

.mrph-exam-progress-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 830;
  letter-spacing: -.01em;
}

.mrph-exam-progress-copy small {
  display: block;
  margin-top: 5px;
  color: rgba(225,247,249,.66);
  font-size: 11px;
}

.mrph-exam-timer {
  min-width: 118px;
  padding: 11px 15px;
  border: 1px solid rgba(184,242,245,.17);
  border-radius: 15px;
  color: #fff;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px rgba(255,255,255,.06);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: .055em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mrph-exam-progress-track {
  position: relative;
  z-index: 2;
  height: 5px;
  margin-top: -5px;
  background: rgba(255,255,255,.08);
}

.mrph-exam-progress-track i {
  position: relative;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #70edf1, #23c3cf);
  box-shadow: 0 0 18px rgba(63,217,225,.52);
}

[dir="rtl"] .mrph-exam-progress-track i {
  border-radius: 999px 0 0 999px;
}

.mrph-exam-question {
  min-height: 570px;
  padding: clamp(30px, 4.2vw, 54px);
  background:
    linear-gradient(rgba(8,117,130,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,117,130,.024) 1px, transparent 1px),
    linear-gradient(180deg, rgba(252,254,255,.99), rgba(255,255,255,1));
  background-size: 42px 42px, 42px 42px, auto;
}

.mrph-exam-question-number {
  min-width: 48px;
  height: 31px;
  margin-bottom: 22px;
  padding: 0 13px;
  border: 1px solid rgba(8,117,130,.09);
  border-radius: 999px;
  color: #087582;
  background: linear-gradient(135deg, rgba(40,198,213,.12), rgba(255,255,255,.96));
  box-shadow: 0 7px 17px rgba(8,117,130,.06);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
}

.mrph-exam-question h3 {
  max-width: 940px;
  margin: 0 0 32px;
  color: #10283b;
  font-size: clamp(22px, 2.45vw, 32px);
  font-weight: 790;
  line-height: 1.42;
  letter-spacing: -.024em;
}

[dir="rtl"] .mrph-exam-question h3 {
  line-height: 1.62;
  letter-spacing: -.01em;
}

.mrph-exam-options {
  display: grid;
  gap: 12px;
  max-width: 990px;
}

.mrph-exam-option {
  position: relative;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  min-height: 64px;
  padding: 10px 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 88, 108, .12);
  border-radius: 17px;
  color: #20394b;
  background: rgba(250,253,254,.94);
  box-shadow: 0 7px 20px rgba(7,48,66,.025);
}

.mrph-exam-option::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  opacity: 0;
  background: linear-gradient(#6ce8ed, #159aaa);
  transition: opacity .16s ease;
}

.mrph-exam-option:hover {
  transform: translateY(-1px);
  border-color: rgba(40,198,213,.42);
  background: #fff;
  box-shadow: 0 12px 30px rgba(7,72,90,.075);
}

.mrph-exam-option:hover::after,
.mrph-exam-option.selected::after {
  opacity: 1;
}

.mrph-exam-option.selected {
  border-color: rgba(32,178,191,.55);
  color: #0b3343;
  background:
    radial-gradient(circle at 95% 0%, rgba(72,221,229,.13), transparent 11rem),
    linear-gradient(135deg, rgba(229,250,251,.94), #fff);
  box-shadow:
    0 0 0 3px rgba(40,198,213,.075),
    0 13px 32px rgba(7,82,99,.08);
}

.mrph-exam-option b {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(8,117,130,.08);
  border-radius: 12px;
  color: #087582;
  background: linear-gradient(145deg, rgba(40,198,213,.13), rgba(255,255,255,.82));
  font-size: 14px;
  box-shadow: inset 0 1px rgba(255,255,255,.8);
}

.mrph-exam-option.selected b {
  border-color: rgba(40,198,213,.25);
  color: #effeff;
  background: linear-gradient(145deg, #087582, #21b8c5);
  box-shadow: 0 8px 18px rgba(8,117,130,.18);
}

.mrph-exam-option span {
  font-size: 14px;
  line-height: 1.55;
}

.mrph-exam-question-foot {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(13,91,111,.085);
}

.mrph-exam-question-foot > .mrph-exam-secondary {
  color: #6b5730;
  border-color: rgba(202,153,57,.19);
  background: rgba(255,249,237,.82);
}

.mrph-exam-nav-actions {
  gap: 10px;
}

.mrph-exam-question-foot .mrph-exam-secondary,
.mrph-exam-question-foot .mrph-exam-primary {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 13px;
}

.mrph-exam-question-foot .mrph-exam-primary {
  min-width: 112px;
  color: #effeff;
  background: linear-gradient(135deg, #062a3e, #087582);
  box-shadow: 0 12px 25px rgba(6,61,78,.18);
}

.mrph-exam-question-foot .mrph-exam-primary:hover {
  filter: brightness(1.06);
}

.mrph-exam-question-foot button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.mrph-exam-side {
  top: 92px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f7fbfc);
}

.mrph-exam-side-head {
  position: relative;
  min-height: 126px;
  padding: 24px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(64,222,230,.30), transparent 12rem),
    linear-gradient(145deg, #041927, #07546a);
}

.mrph-exam-side-head::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(90deg, #000, transparent);
}

.mrph-exam-side-head strong,
.mrph-exam-side-head small {
  position: relative;
  z-index: 1;
}

.mrph-exam-side-head strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 790;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.mrph-exam-side-head small {
  display: block;
  margin-top: 9px;
  color: rgba(222,245,247,.68);
  font-size: 11px;
}

.mrph-exam-legend {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
  padding: 14px 14px 2px;
  color: #718491;
  font-size: 8px;
}

.mrph-exam-legend span {
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.mrph-exam-legend i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px rgba(8,117,130,.035);
}

.mrph-exam-palette {
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 7px;
  max-height: 374px;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(8,117,130,.22) transparent;
}

.mrph-exam-palette button {
  min-width: 0;
  border-color: rgba(20,91,111,.10);
  border-radius: 11px;
  color: #627885;
  background: rgba(250,253,254,.95);
  font-size: 10px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.mrph-exam-palette button:hover {
  transform: translateY(-1px);
  border-color: rgba(40,198,213,.40);
}

.mrph-exam-palette button.answered {
  color: #075969;
  border-color: rgba(40,198,213,.24);
  background: rgba(40,198,213,.12);
}

.mrph-exam-palette button.marked {
  box-shadow: inset 0 -3px 0 #e8ad45;
}

.mrph-exam-palette button.current {
  color: #fff;
  border-color: #087582;
  background: linear-gradient(145deg, #07566a, #0a8996);
  box-shadow: 0 7px 16px rgba(8,117,130,.18);
}

.mrph-exam-side-foot {
  position: relative;
  padding: 14px;
  border-top: 1px solid rgba(13,91,111,.08);
  background: rgba(247,251,252,.95);
}

.mrph-exam-side-foot .mrph-exam-primary {
  min-height: 45px;
  border-radius: 13px;
  color: #effeff;
  background: linear-gradient(135deg, #062b3e, #087582);
  box-shadow: 0 11px 24px rgba(6,61,78,.16);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .mrph-exam-shell {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 16px;
  }

  .mrph-exam-question {
    padding: 34px 30px;
  }

  .mrph-exam-question h3 {
    font-size: clamp(21px, 2.5vw, 28px);
  }

  .mrph-exam-side-head {
    padding: 21px 18px;
  }
}

@media (max-width: 900px) {
  body:has(.mrph-exam-shell) .topbar .page-title {
    max-width: 68vw;
    font-size: 22px;
  }

  .mrph-exam-shell {
    grid-template-columns: minmax(0,1fr);
  }

  .mrph-exam-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    grid-template-rows: auto auto;
  }

  .mrph-exam-side-head {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 0;
  }

  .mrph-exam-legend {
    grid-column: 2;
    grid-row: 1;
  }

  .mrph-exam-palette {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(10, minmax(0,1fr));
    max-height: 154px;
    padding-top: 8px;
  }

  .mrph-exam-side-foot {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 680px) {
  body:has(.mrph-exam-shell) .topbar .page-title {
    max-width: 62vw;
    font-size: 18px;
  }

  .mrph-exam-app:has(.mrph-exam-shell) {
    padding-bottom: 20px;
  }

  .mrph-exam-main,
  .mrph-exam-side {
    border-radius: 20px;
  }

  .mrph-exam-toolbar {
    min-height: 82px;
    padding: 18px;
  }

  .mrph-exam-timer {
    min-width: 96px;
    padding: 10px 11px;
    font-size: 17px;
  }

  .mrph-exam-question {
    min-height: 0;
    padding: 26px 18px 22px;
    background-size: 32px 32px, 32px 32px, auto;
  }

  .mrph-exam-question-number {
    margin-bottom: 17px;
  }

  .mrph-exam-question h3 {
    margin-bottom: 24px;
    font-size: 21px;
    line-height: 1.48;
  }

  .mrph-exam-option {
    grid-template-columns: 38px minmax(0,1fr);
    gap: 11px;
    min-height: 60px;
    padding: 9px 12px;
    border-radius: 15px;
  }

  .mrph-exam-option b {
    width: 35px;
    height: 35px;
  }

  .mrph-exam-option span {
    font-size: 13px;
  }

  .mrph-exam-question-foot {
    gap: 11px;
    margin-top: 27px;
    padding-top: 18px;
  }

  .mrph-exam-question-foot > .mrph-exam-secondary,
  .mrph-exam-nav-actions,
  .mrph-exam-nav-actions button {
    width: 100%;
  }

  .mrph-exam-side {
    display: block;
  }

  .mrph-exam-side-head {
    min-height: 108px;
  }

  .mrph-exam-palette {
    grid-template-columns: repeat(5, minmax(0,1fr));
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mrph-exam-option,
  .mrph-exam-palette button {
    transition: none;
  }
}
