/* PPX SAT Bluebook UI v1.6.7 – Final Bluebook Layout */
.sat-bluebook {
  width: 100%;
  margin: 0 auto;
  padding: 12px;
  background: #fff; /* Keep background for content visibility */
  /* Removed border and box-shadow to eliminate the frame */
  height: 100vh; /* Full viewport height */
  display: flex;
  flex-direction: column; /* Stack header, content, footer vertically */
  overflow: hidden; /* Disable both horizontal and vertical scrolls */
}

/* Header */
.sat-header {
  display: flex;
  align-items: flex-start; /* Vertically align text to top */
  justify-content: space-between; /* Align title left, highlights right */
  margin-bottom: 10px;
  border-bottom: 3px dashed #000; 
  flex: 0 0 20%; /* Fixed 20% height */
  position: relative;
  z-index: 3;
  overflow: hidden; /* Prevent scroll in header */
}

.sat-section-title { 
  font-weight: 700; 
  font-size: 20px; 
  text-align: left; /* Left align title */
  flex: 1; /* Take space on left */
}

#sat-timer { 
  font-weight: 700; 
  color: #1d4ed8; 
  text-align: center; 
  flex: 1; /* Center timer in middle */
  display: flex;
  flex-direction: column; /* Stack timer and hide button vertically */
  align-items: center; /* Center content horizontally */
  justify-content: flex-start; /* Align to top */
}

#sat-highlights { 
  font-size: 14px; 
  color: #374151; 
  text-align: right; /* Right align highlights */
  flex: 1; /* Take space on right */
}

.sat-hide-timer {
  background: white !important; /* Force white background */
  color: black !important; /* Force black text */
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 5px; /* Space under timer */
  text-align: center; /* Center the button text */
  width: auto; /* Auto width for button */
}

.sat-hide-timer:hover,
.sat-hide-timer:focus,
.sat-hide-timer:active {
  background: #f0f0f0 !important; /* Light gray on hover, no orange */
  color: black !important;
}

/* Base shell & grid */
.sat-shell { border: none; padding: 0; border-radius: 0; }

.sat-split {
  display: grid;
  grid-template-columns: 50% 3px 50%; /* Equal 50/50 split */
  align-items: stretch;
  gap: 0;
  height: 100%; /* Full height of body content */
}

/* Passage side */
.sat-left {
  padding: 10px;
  overflow: hidden; /* Prevent scroll in left pane */
}

/* Vertical split line (confined to body content) */
.sat-handle {
  position: relative;
  height: 100%; /* Full body height */
  width: 3px;
  background: #cbd5e1;
  cursor: col-resize;
  border-radius: 2px;
}

/* Add centered double-arrow indicator */
.sat-handle::before {
  content: "«»";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #fff;
  font-family: Arial, sans-serif;
  background: #4b5563;
  border-radius: 4px;
  padding: 2px 4px;
  opacity: 0.85;
  pointer-events: none;
}
.sat-handle::after {
  content: "";
  position: absolute;
  top: 0;
  left: 1px;
  width: 1px;
  height: 100%;
  background: #9ca3af;
}

/* Right pane */
.sat-right {
  padding: 14px 18px;
  border-left: none;
  border-radius: 0;
  overflow: hidden; /* Prevent scroll in right pane */
}

/* Question text */
.sat-question {
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Choice layout (matches Bluebook) */
.sat-choice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  background: #fff;
  transition: background .15s, border-color .15s;
  min-height: 40px;
  overflow: auto;
}
.sat-choice:hover { background: #f9fafb; border-color: #9ca3af; }
.sat-choice.crossed .label { text-decoration: line-through; opacity: .5; }
.sat-choice.crossed { text-decoration: line-through; }

/* Label + Radio */
.sat-choice .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  line-height: 18px;
  overflow: visible;
  word-wrap: break-word;
  max-width: 100%;
}

.sat-choice input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #9ca3af;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.sat-choice input[type="radio"]:checked {
  border-color: #2563eb;
}

.sat-choice input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
}

/* Strike and Undo buttons */
.sat-strike-icon {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: line-through;
}

.sat-strike-icon:hover {
  background: #f3f4f6;
}

.sat-undo-text {
  background: none;
  border: none;
  font-weight: bold;
  color: #000;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-left: 5px;
  display: none;
}

.sat-undo-text:hover {
  text-decoration: underline;
}

/* Mark for review */
.sat-tags { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.sat-pill {
  border: 1px solid #64748b;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
}
.sat-pill.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.sat-mark {
  background: #fff7ed;
  border: 1px dashed #f59e0b;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  display: none;
}
.sat-mark.active { display: inline-flex; }

/* Footer buttons */
.sat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  border-top: 3px dashed #000; 
  flex: 0 0 15%; /* Fixed 15% height */
  overflow: hidden; /* Prevent scroll in footer */
}

.sat-btn {
  background: #f97316;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px; /* Add top padding space above buttons */
}
.sat-btn:hover { filter: brightness(.95); }
.sat-btn-submit { background: #2563eb; }

/* Body content */
#sat-content {
  flex: 1 0 65%; /* 65% height for body content */
  position: relative; /* For positioning the vertical line */
  overflow: hidden; /* Disable scroll in body */
}

/* Responsive */
@media (max-width: 100%){
  .sat-split{ grid-template-columns: 1fr; }
  .sat-handle{ display: none; }
}