/* SGIA Exam Forms - Compact Design System */
/* Applied to: Cambridge (Checkpoint/IGCSE/AS-A Level), IB DP, ICAS */

/* Force uppercase for text inputs */
input[type="text"]:not([data-no-uppercase]),
input[name*="name"]:not([type="file"]),
input[name*="language"],
input[name*="nationality"],
input[name*="subject"] {
  text-transform: uppercase;
}

/* Form notice/info box - compact */
.form-notice,
.info-box,
.notice:not(.error) {
  background: #f5f5f5;
  border: 2px solid #000;
  padding: 12px 16px;
  margin: 0 0 16px 0;
}

.form-notice p,
.info-box p {
  margin: 4px 0;
  line-height: 1.4;
}

.form-notice strong,
.info-box strong {
  font-weight: 700;
}

/* Panel/Form container - compact */
.panel,
form.panel {
  max-width: 960px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* Fieldsets - compact borders and spacing */
fieldset {
  border: 2px solid #000;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  background: #fff;
}

fieldset legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 1rem;
  color: #0B5394;
  margin-bottom: 8px;
}

/* Headings - reduce spacing */
h2 {
  margin: 14px 0 10px 0;
  font-size: 1.1rem;
  color: #0B5394;
}

h3 {
  margin: 10px 0 8px 0;
  font-size: 1rem;
}

/* Grid layout - 2 columns compact */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

/* Labels - compact */
.grid label,
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* Inputs & Selects - compact padding */
.grid label input,
.grid label select,
.grid label textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 7px 10px;
  border: 1px solid #000;
  font-size: 0.95rem;
  background: #fff;
}

/* Remove asterisks - hide required indicators */
.required,
label .required,
span.required {
  display: none;
}

/* Subject selection - compact rows */
.subject,
.subject-row {
  display: grid;
  grid-template-columns: 24px 1fr 120px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #000;
  background: #fff;
  margin-bottom: 8px;
}

.subject-number {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0B5394;
}

.subject input,
.subject select {
  padding: 6px 8px;
  border: 1px solid #000;
  font-size: 0.9rem;
  margin: 0;
}

/* A Level subject groups - compact */
.alevel-group {
  border: 2px solid #000;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.alevel-group legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0B5394;
}

.alevel-group .subjects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.alevel-group .subject {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #000;
  margin: 0;
}

.alevel-group .subject input[type="checkbox"],
.alevel-group .subject input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 2px 0 0 0;
}

.alevel-group .subject label {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.3;
}

.alevel-group .subject small {
  font-size: 0.75rem;
  color: #666;
}

/* Level select for A Level */
.level-select {
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid #000;
  max-width: 120px;
}

/* Fee display - compact */
.fee-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
  font-size: 0.9rem;
}

.fee-row:last-child {
  border-bottom: 2px solid #000;
  font-weight: 700;
  padding-top: 8px;
  margin-top: 4px;
}

.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0B5394;
}

/* File upload - compact */
input[type="file"] {
  display: block;
  padding: 6px;
  border: 1px solid #000;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Checkbox labels - compact */
.checkbox-label,
label.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Declaration box - compact */
.declaration-text,
.declaration-box {
  padding: 10px 12px;
  background: #f5f5f5;
  border-left: 3px solid #0B5394;
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.declaration-text p,
.declaration-box p {
  margin: 0;
}

/* Buttons - compact */
button[type="submit"],
.button {
  margin-top: 14px;
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* Form actions */
.form-actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

/* Responsive - mobile stack */
@media (max-width: 768px) {
  .grid,
  .alevel-group .subjects {
    grid-template-columns: 1fr;
  }
  
  .subject,
  .subject-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .subject-number {
    font-size: 0.8rem;
  }
  
  fieldset,
  .alevel-group {
    padding: 12px;
  }
  
  .panel,
  form.panel {
    padding: 14px 16px;
  }
}

/* Small helper text */
small,
.help-text {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 2px;
}

/* Remove excessive margins */
p {
  margin: 8px 0;
}

/* Compact spacing for form sections */
.form-section,
section {
  margin-bottom: 14px;
}

/* Table - compact for review pages */
table {
  font-size: 0.9rem;
}

table th,
table td {
  padding: 8px 10px;
  border: 1px solid #000;
}

table th {
  background: #f5f5f5;
  font-size: 0.85rem;
}
