/* ============================
   4-YEAR PLANNER STYLES
   ============================ */

/* MAIN LAYOUT */
.planner-container {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
  background: var(--bg-warm);
}

/* LEFT CHECKLIST */
.requirements {
  width: 290px;
  flex-shrink: 0;
  background: var(--bg-card);
  padding: 20px;
  border-right: 2px solid var(--border-warm-strong);
  overflow-y: auto;
}

.requirements h2 {
  color: var(--maroon);
  margin-bottom: 6px;
  font-size: 20px;
}

.reset-plan-btn {
  margin-bottom: 15px;
}

.req-progress {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.requirements ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirements li {
  margin-bottom: 10px;
}

.requirements li label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
}

.requirements input[type="checkbox"] {
  accent-color: var(--maroon);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.requirements input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: #b7aa96;
}

.requirements .disclaimer-text {
  margin: 10px 0 0;
}

/* GPA DISPLAY */
.gpa-display {
  text-align: center;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.gpa-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--maroon);
  font-family: 'Quicksand', sans-serif;
  line-height: 1.2;
}

.gpa-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.gpa-summary {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.gpa-hint {
  margin: 8px 0 0;
}

/* PLAN TOTALS */
.plan-totals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
}

.plan-totals-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-totals-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--maroon);
  font-family: 'Quicksand', sans-serif;
}

/* RIGHT SIDE */
.plan-main {
  flex: 1;
  padding: 24px 30px;
  overflow-y: auto;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

/* YEAR BLOCK */
.year-block {
  background: var(--bg-card);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.year-block h3 {
  color: var(--maroon);
  margin-bottom: 12px;
  font-size: 20px;
}

/* SEMESTERS */
.semesters {
  display: flex;
  gap: 15px;
}

.semester {
  flex: 1;
  min-width: 0;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid #e8dcc7;
  transition: outline-color 0.3s ease;
}

.semester.import-highlight {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.semester h4 {
  color: var(--gold);
  margin-bottom: 6px;
  font-size: 16px;
}

/* TABLE INSIDE SEMESTER */
.semester-table {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
}

.semester-rows {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
}

.semester-header,
.semester-footer,
.course-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1.2fr 44px;
  column-gap: 6px;
  align-items: center;
}

.semester-header span {
  font-weight: 600;
  font-size: 12px;
  color: #6b5d4a;
}

.course-row input,
.course-row select {
  width: 100%;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid #e6dccb;
  background: #fffdf8;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.grade-select {
  font-size: 12px;
  padding: 4px 2px;
  cursor: pointer;
}

.credit-input {
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hide the native number spinners — they crowd the small credits field */
.credit-input::-webkit-inner-spin-button,
.credit-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.course-input:focus,
.credit-input:focus,
.grade-select:focus {
  outline: var(--focus-ring);
  outline-offset: 0;
  background: #ffffff;
}

/* ROW CONTROLS (move / clear) */
.row-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.row-move {
  width: 22px;
  padding: 3px 0;
  font-size: 11px;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.row-move:hover {
  border-color: #e6dccb;
  background: #fffdf8;
}

.row-clear {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.row-clear:hover {
  background: #f2e7d0;
  color: var(--maroon);
}

/* ADD CLASS BUTTON */
.add-class-btn {
  width: 100%;
  padding: 5px 8px;
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.add-class-btn:hover {
  background: #fffdf8;
  color: var(--maroon);
  border-color: var(--gold);
}

.semester-footer {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #e0d6c5;
  font-size: 13px;
  font-weight: 600;
  color: #6b5d4a;
}

.semester-gpa {
  text-align: center;
  font-size: 12px;
  color: var(--maroon);
}

/* YEAR TOTAL */
.year-total-row {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e3d7c0;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13px;
  color: #4d3e2f;
}

.req-divider {
  margin: 14px 0;
  border: none;
  border-top: 1px solid #e0d6c5;
}

.major-label {
  display: block;
  font-size: 13px;
  color: #6b5d4a;
  margin-bottom: 4px;
}

.major-select {
  width: 100%;
  margin-bottom: 10px;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid #e6dccb;
  background: #fffdf8;
}

.major-req-list .empty {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .planner-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .requirements {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--border-warm-strong);
  }

  .year-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .plan-main {
    padding: 14px;
  }

  .semesters {
    flex-direction: column;
  }

  .year-grid {
    gap: 16px;
  }
}
