/* The admin time clock: what the person is on with its running time, Clock
   in or Clock out, and the boxes that ask which kind of admin time and what
   it is for. It borrows the Clock in and Clock out buttons from the top of
   the admin dashboard, so it carries their colors with it to the other pages
   it sits on. */
.admin-time {
  --clock-green: #2e7d52;
  --clock-green-hover: #226b46;
  --clock-green-edge: #1b6b43;
  --clock-green-soft: #ecf5ef;
  --clock-green-border: #5fae84;
  --clock-red: #e03a3a;
  --clock-red-ink: #9b1c1c;
  --clock-red-soft: #fbe2e1;
  --clock-on-dot: #16804c;
  --clock-body: #5c6b6a;
  --clock-ink-soft: #1f3b3a;
}
.admin-time__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}
/* Switch is a quiet link under Clock out, with room for a thumb. */
.admin-time__switch {
  min-height: 2.75rem;
  padding: 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--clock-ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;

  &:focus-visible { outline: 2px solid var(--clock-green); outline-offset: 2px; border-radius: 0.25rem; }
}

.admin-time__words--short { display: none; }

/* At the top of the admin dashboard the pieces sit in the header's own grid:
   the status beside the greeting, the buttons where Clock in always was. */
.admin-time--header {
  display: contents;

  & .admin-time__buttons { grid-area: clock; align-items: flex-end; }
}

/* On the DSP dashboard it sits under the client Clock In, and its Clock in
   is outlined so the client one stays the main button. */
.admin-time--dsp,
.admin-time--page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;

  & .shift-status__timer { color: inherit; }
  & .clock-button--in {
    padding: 0 1.5rem;
    border: 1.5px solid var(--clock-green-border);
    background: #fff;
    color: var(--clock-green);
    box-shadow: inset 0 -2px 0 var(--clock-green-soft), 0 2px 4px rgb(60 45 20 / 0.08);

    &:hover { background: var(--clock-green-soft); }
  }
}
/* On the other office pages it keeps to the top right, out of the way. */
.admin-time--page {
  flex-direction: row;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;

  & .admin-time__buttons { flex-direction: row; gap: 0.75rem; }
}

/* The boxes that ask: which kind, what for, and "Clock out now?". */
.admin-time-dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 27.5rem;
  padding: 1.5rem;
  text-align: left;
}
.admin-time-dialog__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}
.admin-time-dialog__hint {
  margin-top: -0.5rem;
  font-size: 0.9375rem;
  color: #4b5563;
}
/* One big button for each kind of admin time: easy to hit with a thumb. */
.admin-time-dialog__types {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;

  & form { display: flex; }
}
.admin-time-dialog__type {
  flex: 1;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid var(--clock-green-border);
  border-radius: 0.75rem;
  background: var(--clock-green-soft);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--clock-ink-soft);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;

  &:hover { border-color: var(--clock-green); background: #dff0e6; }
  &:focus-visible { outline: 2px solid var(--clock-green); outline-offset: 2px; }
}
.admin-time-dialog__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-time-dialog__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
}
.admin-time-dialog__buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 767px) {
  .admin-time--header .admin-time__words--long { display: none; }
  .admin-time--header .admin-time__words--short { display: inline; }
}

@media (max-width: 639px) {
  .admin-time-dialog__buttons {
    flex-direction: column-reverse;

    & .btn { width: 100%; }
  }
  .admin-time--page { flex-direction: column; align-items: stretch; }
}

/* The note on the clock-out page that says which admin time starts next. */
.admin-time-next {
  padding: 0.875rem 1rem;
  border: 1px solid #5fae84;
  border-radius: 0.75rem;
  background: #ecf5ef;
  font-size: 1rem;
  color: #1f3b3a;
}
