/**
 * Reading Section Styles
 * Independent scrolling for passages and questions
 */

/* Custom scrollbar styling for reading section */
.reading-scroll-container {
  scrollbar-width: thin;
  scrollbar-color: #4A90E2 transparent;
}

.reading-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.reading-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.reading-scroll-container::-webkit-scrollbar-thumb {
  background-color: #4A90E2;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.reading-scroll-container::-webkit-scrollbar-thumb:hover {
  background-color: #357ABD;
}

/* Smooth scrolling */
.reading-scroll-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Section headers - sticky positioning */
.reading-section-header {
  position: sticky;
  top: 0;
  background: var(--surface-strong);
  z-index: 10;
  padding: 24px 32px;
  border-bottom: 2px solid var(--line);
}

/* Question section styling */
.reading-question-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--line);
}

.reading-question-section:last-of-type {
  border-bottom: none;
}

/* Question item styling */
.reading-question-item {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.reading-question-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Question number badge */
.reading-question-number {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  font-size: 14px;
  margin-right: 10px;
  font-weight: 700;
}

/* Input field styling */
.reading-answer-input {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  background: var(--surface-strong);
  color: var(--text);
  transition: border-color 0.2s;
}

.reading-answer-input:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Passage text styling */
.reading-passage-text {
  line-height: 1.8;
  color: var(--text-soft);
  font-size: 15px;
  white-space: pre-wrap;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .reading-split-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  
  .reading-scroll-container {
    max-height: 400px;
  }
  
  .reading-section-header {
    padding: 16px 20px;
  }
  
  .reading-question-section {
    padding: 0 20px 24px 20px;
  }
}

/* Print styles */
@media print {
  .reading-scroll-container {
    overflow: visible !important;
    height: auto !important;
  }
}
