/* style.css - General styling for predicted paper and mark scheme */

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  color: #1e293b;
  margin: 0;
  padding: 0;
  background-color: #f1f5f9;
}

/* Page container for screen view */
.page {
  position: relative;
  background: #ffffff;
  width: 210mm;
  min-height: 297mm;
  margin: 20px auto;
  padding: 20mm;
  box-sizing: border-box;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid #94a3b8;
  page-break-after: always;
  overflow: hidden;
}

/* When printing, remove shadows and margins, use standard A4 dimensions */
@media print {
  body {
    background-color: #ffffff;
  }
  .page {
    margin: 0;
    box-shadow: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    page-break-inside: avoid;
    border: 1px solid #94a3b8;
    overflow: hidden;
}
}

/* Margin Warnings (masking the border) */
.margin-warning-top {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-family: Arial, sans-serif;
  font-weight: normal;
  text-transform: uppercase;
  background: #ffffff;
  padding: 0 10px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.margin-warning-bottom {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-family: Arial, sans-serif;
  font-weight: normal;
  text-transform: uppercase;
  background: #ffffff;
  padding: 0 10px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

/* Header and Footer */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.header-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-subtitle {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: bold;
}

.header-meta {
  text-align: right;
  font-size: 12px;
  font-weight: bold;
}

.footer-container {
  position: absolute;
  bottom: 25mm;
  left: 20mm;
  right: 20mm;
  border-top: 1px solid #cbd5e1;
  padding-top: 8px;
  font-size: 10px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.disclaimer-text {
  position: absolute;
  bottom: 5mm;
  left: 20mm;
  right: 20mm;
  font-size: 9px;
  line-height: 1.3;
  color: #64748b;
  text-align: justify;
  margin-top: 10px;
}

/* Question Layouts */
.question-block {
  margin-bottom: 30px;
  page-break-inside: avoid;
}

.question-header {
  font-size: 16px;
  font-weight: bold;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 5px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.question-part {
  margin-bottom: 20px;
  position: relative;
}

.question-text {
  font-size: 14px;
  margin-bottom: 10px;
}

.question-marks {
  float: right;
  font-weight: bold;
  font-size: 14px;
  margin-left: 10px;
}

/* Calculation Grid - Styled as a clean blank box with a border */
.calculation-grid {
  border: 1px solid #94a3b8;
  background-color: #ffffff;
  min-height: 160px;
  margin: 12px 0 20px 0;
  width: 100%;
  box-sizing: border-box;
}

/* Writing Lines */
.writing-lines {
  background-image: linear-gradient(to bottom, transparent 27px, #cbd5e1 28px);
  background-size: 100% 28px;
  line-height: 28px;
  margin: 12px 0 20px 0;
  width: 100%;
  box-sizing: border-box;
}

/* Diagrams */
.topic-diagram {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  max-height: 130mm;
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 13px;
}

.data-table th, .data-table td {
  border: 1px solid #475569;
  padding: 8px 12px;
  text-align: left;
}

.data-table th {
  background-color: #f8fafc;
  font-weight: bold;
}

/* Mark Scheme styling */
.mark-scheme-header {
  background-color: #1e293b;
  color: #ffffff;
  padding: 10px;
  font-weight: bold;
  font-size: 15px;
  margin-top: 25px;
  margin-bottom: 10px;
}

.mark-point {
  margin-bottom: 8px;
  padding-left: 20px;
  text-indent: -20px;
  font-size: 14px;
}

.mark-id {
  font-weight: bold;
  color: #3b82f6;
  margin-right: 5px;
}

.reject-box {
  background-color: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: 10px;
  margin: 10px 0 15px 20px;
  font-size: 13px;
  color: #991b1b;
}

.reject-title {
  font-weight: bold;
  margin-bottom: 3px;
}

.ecf-note {
  background-color: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 10px;
  margin: 10px 0 15px 20px;
  font-size: 13px;
  color: #166534;
}

.ecf-title {
  font-weight: bold;
  margin-bottom: 3px;
}

.indicative-content {
  background-color: #f8fafc;
  border-left: 4px solid #64748b;
  padding: 10px;
  margin: 10px 0 15px 20px;
  font-size: 13px;
}

.indicative-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.level-descriptor {
  margin-bottom: 5px;
  font-size: 13px;
}

.bold-chem {
  font-weight: bold;
}

/* Screen-only utility classes */
.screen-only {
  display: block;
}

@media print {
  .screen-only {
    display: none !important;
  }
}

.download-bar {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
  max-width: 210mm;
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.download-bar-text {
  font-size: 14px;
  font-weight: bold;
}

.download-link {
  background-color: #3b82f6;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.2s, transform 0.1s;
}

.download-link:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.download-link:active {
  transform: translateY(0);
}
