/* AcadMates v1.4.7 / Build 433 — isolated Linked E-Class card proportions, two-row actions, read-only note fit, and retained Toolkit tab row. */

.route-teachertoolkit .teacher-toolkit-tabs {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  overflow-x: auto;
  overflow-y: hidden;
}
.route-teachertoolkit .teacher-toolkit-tabs > button { min-width: 140px; }

/* Match the normal Classes card proportions instead of stretching one record across the page. */
.route-eclasslinks .class-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.route-eclasslinks .linked-eclass-readonly-card {
  width: auto;
  max-width: none;
}
.route-eclasslinks .linked-eclass-readonly-card .class-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.route-eclasslinks .linked-eclass-readonly-card .class-card-footer > span {
  min-width: 0;
  line-height: 1.45;
}
.route-eclasslinks .linked-eclass-readonly-card .class-card-inline-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  padding: 0;
}
.route-eclasslinks .linked-eclass-readonly-card .class-card-inline-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  white-space: normal;
  line-height: 1.2;
}

/* Adviser E-Class: keep the subject-teacher lock note inside a compact rounded rectangle. */
.jhs-eclass-actions .linked-eclass-readonly-note {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 250px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(47,129,123,.22);
  border-radius: 10px;
  background: #EAF7F4;
  color: #2F817B;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
:root[data-theme="dark"] #app-shell .jhs-eclass-actions .linked-eclass-readonly-note {
  border-color: rgba(143,214,211,.28);
  background: rgba(143,214,211,.12);
  color: #AEE3E0;
}

@media (max-width:1120px) {
  .route-eclasslinks .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:560px) {
  .route-eclasslinks .class-grid { grid-template-columns: minmax(0, 1fr); }
}

/* v1.4.8 / Build 434 — Linked E-Class page is quieter: cloud state runs silently and the explanatory note is easier to read. */
.route-eclasslinks .linked-eclass-section-heading p {
  font-size: 16px;
  line-height: 1.55;
  max-width: 980px;
  color: var(--muted, #636c77);
}


/* v1.4.12 / Build 438 — larger class notes and clearer Link for E-Class hierarchy. */
.route-classes .page-heading p { font-size: 14px !important; }
.route-classes .section-heading p { font-size: 13px !important; line-height: 1.55 !important; }
.route-classes .class-card p { font-size: 12.5px !important; line-height: 1.5 !important; }
.route-eclasslinks .page-heading p { max-width: 980px; }
.route-eclasslinks .page-heading .page-heading-line + .page-heading-line { margin-top: 2px; }
.route-eclasslinks .linked-eclass-readonly-card { gap: 10px; }
.route-eclasslinks .linked-eclass-readonly-card .linked-eclass-grade-section { font-size: 15px; font-weight: 800; color: var(--navy-900, #17213f); line-height: 1.35; margin-top: 2px; }
.route-eclasslinks .linked-eclass-readonly-card .linked-eclass-teacher { font-size: 12.5px; line-height: 1.45; margin-top: -2px; margin-bottom: 2px; }
.route-eclasslinks .linked-eclass-readonly-card .linked-eclass-page-link { margin-top: 4px; }
.route-eclasslinks .linked-eclass-readonly-card .linked-eclass-page-link input { margin-top: 8px; }

/* v1.4.12 / Build 438 — isolated UI refinements; protected core styles.css remains unchanged. */
.page-heading .page-heading-line { display: block; }
.linked-eclass-share { display: grid; gap: 18px; }
.linked-eclass-share .linked-eclass-code-field { display: grid; gap: 10px; margin-top: 2px; }
.linked-eclass-share .linked-eclass-code-field input { margin-top: 0; }
.linked-eclass-share .form-actions { margin-top: 4px; }
.linked-eclass-share .form-help { margin: 6px 0 0; line-height: 1.55; font-size: 13px; }

/* v1.4.13 / Build 439 — larger roster import note and Subject Code connection control. */
.route-classes .roster-card > small {
  display: block;
  margin-top: 12px;
  font-size: 13px !important;
  line-height: 1.55 !important;
}
.subject-code-connect-button {
  align-self: end;
  min-height: 40px;
  padding: 9px 14px;
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .18);
}
.subject-code-connect-button:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
}
:root[data-theme="dark"] #app-shell .subject-code-connect-button {
  border-color: #60a5fa !important;
  background: #2563eb !important;
  color: #ffffff !important;
}


/* v1.4.14 / Build 440 — larger Subject Code connection guidance and exact two-line handled-class description. */
.linked-eclass-connect-target-note,
.linked-eclass-connect-note {
  gap: 7px !important;
  padding: 16px 18px !important;
}
.linked-eclass-connect-target-note strong,
.linked-eclass-connect-note strong {
  font-size: 15px !important;
  line-height: 1.35 !important;
}
.linked-eclass-connect-target-note span,
.linked-eclass-connect-note span {
  font-size: 13px !important;
  line-height: 1.6 !important;
}
.route-classes .page-heading .page-heading-line { display: block; }
.route-classes .page-heading .page-heading-line + .page-heading-line { margin-top: 2px; }

/* v1.4.15 / Build 441 — Generate Code Subject guidance readability and Grade Slip dark-mode option visibility. */
#linked-eclass-subject-code-form .automation-note {
  gap: 7px !important;
  padding: 16px 18px !important;
}
#linked-eclass-subject-code-form .automation-note strong {
  font-size: 15px !important;
  line-height: 1.35 !important;
}
#linked-eclass-subject-code-form .automation-note span {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

:root[data-theme="dark"] #app-shell .route-gradeslip .grade-slip-visibility-toggle {
  background: #162235 !important;
  border-color: #43536d !important;
  color: #eef4ff !important;
}
:root[data-theme="dark"] #app-shell .route-gradeslip .grade-slip-visibility-toggle:has(input:checked) {
  background: #22314a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .18);
}
:root[data-theme="dark"] #app-shell .route-gradeslip .grade-slip-visibility-toggle span {
  color: inherit !important;
}
:root[data-theme="dark"] #app-shell .route-gradeslip .grade-slip-visibility-toggle input {
  accent-color: #60a5fa;
  color-scheme: dark;
}
