
/* Learn by Doing: samlet designfix til holdadministration */

.hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.class-management-grid {
  align-items: stretch;
}

.class-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.class-card h3 {
  margin-bottom: 8px;
}

.class-card p {
  color: var(--muted);
  margin-top: 0;
}

.class-card-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.class-card-primary-actions .button {
  min-width: 0;
}

.class-editor {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.class-editor-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.class-editor-head b {
  font-size: 16px;
}

.class-editor label,
.modal-card label {
  color: var(--ink);
  display: block;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 7px;
}

.class-editor input,
.modal-card input,
.modal-card select,
.modal-card textarea {
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

.class-editor input:focus,
.modal-card input:focus,
.modal-card select:focus,
.modal-card textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 80, 77, .12);
  outline: none;
}

.modal-card textarea {
  min-height: 120px;
  resize: vertical;
}

.icon-button,
.modal-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 34px;
}

.icon-button:hover,
.modal-close:hover {
  background: #eef1f4;
}

.danger-zone {
  border-top: 1px solid #fecdca;
  margin-top: 20px;
  padding-top: 18px;
}

.danger-zone p {
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

.danger-label,
.danger-eyebrow {
  color: #b42318;
  display: inline-block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.button.danger {
  background: #fff1f0;
  border: 1px solid #fecdca;
  color: #b42318;
}

.button.danger:hover {
  background: #fee4e2;
  border-color: #fda29b;
}

.create-class-card {
  align-items: center;
  background: rgba(255, 255, 255, .5);
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  justify-content: center;
  min-height: 260px;
  padding: 28px;
  text-align: center;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  width: 100%;
}

.create-class-card:hover {
  background: #fff;
  border-color: var(--orange);
  transform: translateY(-2px);
}

.create-class-card b {
  display: block;
  font-size: 18px;
  margin-top: 12px;
}

.create-class-card small {
  color: var(--muted);
  display: block;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 230px;
}

.create-class-icon {
  align-items: center;
  background: var(--orange-soft);
  border-radius: 50%;
  color: var(--orange);
  display: flex;
  font-size: 32px;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.modal {
  display: none !important;
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.modal.show {
  align-items: center;
  display: flex !important;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  background: rgba(6, 24, 24, .72);
  inset: 0;
  position: absolute;
}

.modal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  max-width: 540px;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.modal-card-large {
  max-width: 700px;
}

.modal-card h2 {
  margin-bottom: 22px;
  margin-top: 4px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
}

.modal-card .form-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.modal-card .form-actions {
  margin-top: 22px;
}

.subject-mode {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 18px;
}

.form-card .radio-option {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
}

.form-card .radio-option:has(input:checked) {
  background: #edf7f5;
  border-color: var(--green);
}

.form-card .radio-option input {
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  width: 16px;
}

#existingSubjectFields,
#newSubjectFields {
  margin-top: 4px;
}

#newSubjectFields label:not(:first-child) {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .modal.show {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
    max-width: none;
    padding: 24px 20px;
  }

  .subject-mode {
    grid-template-columns: 1fr;
  }

  .class-card-primary-actions {
    flex-direction: column;
  }

  .class-card-primary-actions .button {
    text-align: center;
    width: 100%;
  }
}
