
/*
 * NexoU v0.3.0
 * Estilos del módulo Semestres
 */

.sem-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sem-nav a {
  text-decoration: none;
  color: #56637c;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 700;
}

.sem-nav a.selected {
  color: #4158bb;
  background: #e8edff;
}

.sem-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.sem-title-row h1 {
  margin-bottom: 6px;
}

.sem-title-row .subtitle {
  margin: 0;
}

.sem-link {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.sem-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.sem-card {
  padding: 24px;
  border: 1px solid #dde4ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px #12213a08;
}

.sem-card.is-active {
  border-color: #778ae9;
  box-shadow: 0 0 0 2px #cdd5ff;
}

.sem-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sem-chip {
  background: #eef1f8;
  color: #586783;
  border-radius: 30px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 750;
}

.sem-current {
  color: #356445;
  font-size: 12px;
  font-weight: 800;
}

.sem-card h2 {
  font-size: 21px;
  margin: 18px 0 10px;
  overflow-wrap: anywhere;
}

.sem-meta,
.sem-dates,
.sem-notes {
  color: #64718a;
  font-size: 14px;
  line-height: 1.55;
  margin: 8px 0;
}

.sem-notes {
  overflow-wrap: anywhere;
}

.sem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.sem-actions .secondary {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 12px;
}

.sem-empty {
  border: 1px dashed #c6cfe4;
  border-radius: 20px;
  padding: 38px 24px;
  text-align: center;
  background: white;
}

.sem-empty p {
  color: #64718a;
}

/* Ventana de edición */

.sem-dialog {
  width: min(94vw, 590px);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 0;
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  background: #fff;
  color: #1b2741;
  box-shadow: 0 28px 90px #1a264e42;
}

.sem-dialog::backdrop {
  background: #121d3a99;
}

.sem-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 26px 10px;
}

.sem-dialog-header h2 {
  margin: 0;
  font-size: 23px;
}

.sem-close {
  border: 0;
  background: #eef1f8;
  color: #37445f;
  border-radius: 9px;
  font-size: 24px;
  width: 36px;
  height: 36px;
}

.sem-fields {
  padding: 0 26px 24px;
}

.sem-fields label {
  display: block;
  margin: 17px 0 0;
  font-size: 13px;
  font-weight: 750;
}

.sem-fields input,
.sem-fields select,
.sem-fields textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  border: 1px solid #d6deec;
  border-radius: 10px;
  background: white;
  padding: 11px 12px;
  color: #17233e;
  font: inherit;
}

.sem-fields input,
.sem-fields select {
  height: 46px;
}

.sem-fields textarea {
  resize: vertical;
}

.sem-fields :is(
  input,
  select,
  textarea
):focus {
  outline: 2px solid #a8b5fa;
  outline-offset: 1px;
}

.sem-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sem-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #e8ecf4;
  padding: 19px 26px;
}

/* Celulares */

@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
  }

  .sem-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .sem-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .sem-title-row .primary {
    align-self: flex-start;
  }

  .sem-two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sem-dialog-header,
  .sem-fields,
  .sem-dialog-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
