/* Multi-school platform: school branding, menu modules, settings, notices. */

/* Modules switched off by the school (beats inline display set by other scripts). */
.school-module-off { display: none !important; }

/* Online card payments on maintenance: hide the "pay by card" buttons. */
body.sc-maint-onlinePayments #studentPayOnlineBtn,
body.sc-maint-onlinePayments #paymentCardLinkBtn { display: none !important; }

.school-brand-text {
  display: inline-block;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--primary);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-logo .school-brand-text,
.school-brand-text {
  height: auto !important;
  width: auto !important;
  line-height: 1.25 !important;
  display: inline-block !important;
  font-size: 1.15rem !important;
  text-indent: 0 !important;
  opacity: 1 !important;
}
.brand-logo--on-dark .school-brand-text { color: #fff; font-size: 1.6rem !important; }
/* Other schools have no Bonds landing page to go back to. */
html.is-other-school .back-home { display: none !important; }
img.school-logo-image { object-fit: contain; max-height: 44px; width: auto; }

.school-page-draft {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 4px;
}

/* Full-screen notices: blocked / unknown school, user agreement */
.school-blocked-overlay,
.school-agreement-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 11, 24, 0.82);
  backdrop-filter: blur(4px);
}
.school-blocked-card,
.school-agreement-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg, #fff);
  color: var(--text-color, #1d2433);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.school-blocked-icon { font-size: 2.2rem; color: var(--primary); margin-bottom: 12px; }
.school-blocked-card h2 { margin: 0 0 8px; font-size: 1.35rem; }
.school-blocked-card p { margin: 0; opacity: 0.8; line-height: 1.5; }

.school-agreement-card { max-width: 720px; text-align: left; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.school-agreement-card h2 { margin: 0 0 12px; }
.school-agreement-text {
  flex: 1 1 auto;
  overflow: auto;
  border: 1px solid var(--border-color, #e3e7ef);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  min-height: 160px;
  line-height: 1.55;
}
.school-agreement-check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; cursor: pointer; }
.school-agreement-card .btn { align-self: flex-end; }
html[data-theme="dark"] .school-blocked-card,
html[data-theme="dark"] .school-agreement-card { background: #151b2b; color: #eef1f8; }
html[data-theme="dark"] .school-agreement-text { border-color: #283149; }
.school-settings__check input,
.school-agreement-check input,
.school-module-row__roles input { width: auto; margin: 0; flex: 0 0 auto; }
.school-settings__check { flex-direction: row; }

/* Settings section */
.school-settings__tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.school-settings__tab {
  border: 1px solid var(--border-color, #e3e7ef);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.school-settings__tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.school-settings__form { max-width: 720px; }
.school-settings__inline { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.school-settings__check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.school-settings__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.school-settings__image { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.school-settings__preview {
  width: 160px;
  height: 64px;
  border: 1px dashed var(--border-color, #cfd6e4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: repeating-conic-gradient(rgba(127, 127, 127, 0.08) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
}
.school-settings__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.school-settings__preview span { opacity: 0.6; font-size: 0.85rem; }
.school-settings__image-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.school-settings__image-actions label.btn { cursor: pointer; margin: 0; }
.school-settings input[type="color"] { width: 56px; height: 38px; padding: 2px; border-radius: 8px; }

.school-module-row,
.school-page-row,
.school-course-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e3e7ef);
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--card-bg, transparent);
}
.school-module-row.is-locked { opacity: 0.6; }
.school-module-row__toggle input { width: 20px; height: 20px; }
.school-module-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.school-module-row__main input[type="text"] { width: 100%; max-width: 360px; }
.school-module-row__main small { opacity: 0.75; }
.school-module-row__roles { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }
.school-module-row__roles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.school-module-row__order { display: flex; flex-direction: column; gap: 4px; }
.school-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(127, 127, 127, 0.15);
}
.school-badge--warn { background: rgba(245, 158, 11, 0.18); color: #b45309; }

.school-course-row input[data-field="label"] { flex: 2 1 200px; min-width: 0; }
.school-course-row input[data-field="id"] { flex: 1 1 140px; min-width: 0; font-family: ui-monospace, monospace; }

.school-page-row > i { width: 22px; text-align: center; color: var(--primary); }
.school-page-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.school-page-row__main small { opacity: 0.7; }
.school-icon-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.school-icon-picker label {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color, #e3e7ef);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.school-icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.school-icon-picker label:has(input:checked) { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2); }
.school-page-preview { margin: 8px 0 14px; }
.school-page-preview summary { cursor: pointer; font-weight: 600; }
.school-page-preview .markdown-body { border: 1px solid var(--border-color, #e3e7ef); border-radius: 10px; padding: 12px 16px; margin-top: 8px; }
.school-page-body { line-height: 1.6; }

.school-limit-row { margin-bottom: 14px; max-width: 560px; }
.school-limit-row__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.school-limit-bar { height: 8px; border-radius: 999px; background: rgba(127, 127, 127, 0.18); overflow: hidden; }
.school-limit-bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.school-limit-bar span.is-full { background: #e5484d; }

@media (max-width: 600px) {
  .school-module-row { flex-wrap: wrap; }
  .school-module-row__order { flex-direction: row; }
  .school-course-row { flex-wrap: wrap; }
}
