/* =========================================================
   TID
   Kun styles som er spesifikke for Tid.
   Felles verktøystil styres av school-tool-standard.css
   ========================================================= */


/* OPERASJONER */

.time-operation-picker {
  width: min(100%, 560px);
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.time-operation {
  min-height: 68px;

  padding: 11px 12px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: var(--surface);
  color: var(--text);

  text-align: left;

  cursor: pointer;
}

.time-operation strong {
  display: block;

  margin-bottom: 4px;

  font-size: 14px;
}

.time-operation span {
  display: block;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.35;
}

.time-operation.active {
  border-color: var(--accent);

  box-shadow: inset 0 0 0 1px var(--accent);
}


/* INPUTS */

.time-input-grid {
  width: min(100%, 540px);
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));

  gap: 20px;

  justify-content: center;
}

#duration-inputs {
  grid-template-columns: repeat(3, minmax(110px, 160px));
}

.time-input-grid label {
  display: block;

  margin-bottom: 8px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 700;
}

.time-input-grid input {
  width: 100%;
  height: 50px;

  padding: 0 12px;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--bg);
  color: var(--text);

  font-size: 18px;
  font-weight: 700;
}

.time-input-grid input::placeholder {
  font-size: 14px;
  font-weight: 400;

  opacity: .7;
}


/* SKJUL INAKTIVE INPUTGRUPPER */

.time-input-grid[hidden] {
  display: none !important;
}


/* HOVER */

@media (hover: hover) and (pointer: fine) {
  .time-operation:hover {
    border-color: var(--accent);
  }
}


/* MOBIL */

@media (max-width: 620px) {

  .time-operation-picker,
  .time-input-grid,
  #duration-inputs {
    grid-template-columns: 1fr;
  }

  .time-input-grid > div {
    width: min(100%, 220px);

    margin: 0 auto;
  }

}

.time-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.time-point {
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  text-align: center;
}

.time-point strong,
.time-point small {
  display: block;
}

.time-point strong {
  font-size: 22px;
}

.time-point small {
  margin-top: 3px;
  color: var(--muted);
}

.time-dot {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--accent);
}

.time-arrow {
  min-width: 80px;
  text-align: center;
}

.time-arrow span,
.time-arrow strong {
  display: block;
}

.time-arrow span {
  font-size: 30px;
  line-height: 1;
}

.time-arrow strong {
  margin-top: 6px;
  font-size: 13px;
}

@media (max-width: 520px) {
  .time-line {
    grid-template-columns: 1fr;
  }

  .time-arrow span {
    transform: rotate(90deg);
  }
}
