main.shifts, main.shift-bookings {
  .shift__busy-notice {
    display: none;
  }

  turbo-frame#shifts_frame[busy] {
    .shift__view {
      position: relative;

      .shift__busy-notice {
        align-items: center;
        background-color: color-mix(in srgb, var(--pure-white), transparent 50%);
        cursor: wait;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: 100%;
        justify-content: center;
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        user-select: none;
        width: 100%;
        z-index: 100;

        .loader {
          animation: rotation 1s linear infinite;
          border: 0.25rem solid var(--theme-color-darker);
          border-bottom-color: transparent;
          border-radius: 50%;
          display: inline-block;
          height: 3rem;
          width: 3rem;
        }
      }
    }
  }

  .shift__view {
    display: flex;
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: nowrap;

    .shift-list {
      width: 100%;
    }
  }

  @media screen and (max-width: 1200px) {
    .shift__view {
      --calendar-width:var(--container-s);
    }
  }

  @media screen and (max-width: 1000px) {
    .shift__view {
      flex-direction: column;
    }
  }

  &.admin .calendar__wrapper .calendar {
    overflow: visible;

    .calendar__table tbody tr td.day {
      overflow: visible;
    }
  }
}

span.day__link-status {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background-color: var(--theme-color-darker);
}

.status-bar {
  --status-bar-height: 0.5rem;
  display: flex;
  gap: 1px;
  height: var(--status-bar-height);
  width: 100%;

  tooltip {
    font-size: 0.75rem;
    padding: 0.5rem;
    transform: translate(-50%, 1rem);
  }

  &:has(.status-bar__segment) {
    .status-bar__segment {
      border-radius: calc(var(--status-bar-height) / 2);
      border: 0.5px solid white;


      &.status-bar__segment--open, &.status-bar__segment--offer {
        background-color: var(--blue);
      }

      &.status-bar__segment--booked, &.status-bar__segment--worked {
        background-color: var(--success);
      }

      &.status-bar__segment--pending, &.status-bar__segment--requested {
        background-color: var(--warning);
      }

      &.status-bar__segment--cancelled {
        background-color: var(--danger-dark);
      }
    }
  }
}

.table-section {
  width: 100%;

  &:not(:last-child) {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 0.5rem;
  }

  .shift-bookers__cell{
    overflow-y: scroll;
    max-height: 16vh;
  }
}

form#shift_form, form#placement_form {
  .form-section-row {
    .field {
      max-width: calc(100% / 2 - 1rem);
    }
  }
}

main.admin.shift {
  .page__content {
    section.page__section {

      &#shift-places {
        .cards .card--shift-place {
          border: none;
          box-shadow: none;

          &.card--shift-place--unavailable .avatar {
            opacity: 0.4;
          }
        }
      }
    }
  }
}
