@import "bootstrap/scss/functions";
@import "bootstrap/scss/mixins/breakpoints";
@import "../styles/bootstrap-variables";
@import "../styles/global-variables";

:host {
  --day-gutter: 1.6rem;
}

.scroll-hint {
  position: relative;

  &::before, &::after {
    z-index: 10;
    content: '';
    position: absolute;
    display: block;
    top: 0;
    height: 100%;
    width: calc(var(--day-gutter) * 2);
    height: calc(100% - var(--day-gutter));
    background: $light;
    background: linear-gradient(90deg, rgba($light, 255) 20%, rgba(255,255,255, 0) 100%);
  }

  &::before {
    left: 0;
  }
  &::after {
    right: 0%;
    transform: rotate(180deg);
  }
}

ul.days {
  width: 100%;
  overflow-x: scroll;
  font-size: 2rem;
}

.list-group-horizontal.days li.list-group-item {
  &:nth-child(0), &:nth-child(1) {
    filter: hue-rotate(110deg);
  }
  background-color: transparent;
  text-align: center;
  color: $primary;
  border: 0px;
  border-radius: 1rem;
  padding: var(--day-gutter) calc(var(--day-gutter) / 2);
  &:first-child {
    padding-left: var(--day-gutter);
  }
  &:last-child {
    padding-right: var(--day-gutter);
  }

  display: flex;
  flex-direction: column;
  align-items: center;

  &.selectable {
    cursor: pointer;
    &:not(.empty):hover {
      background-color: tint-color($primary, 80%);
    }
    .date-card {
      background-color: white;
    }
  }
  &.selected .date-card {
    background-color: tint-color($primary, 35%);
    color: white;
    &::before {
      transform: translateY(-0.2em);
    }
  }
  &.empty {
    .date-card {
      background-color: tint-color($gray-600, 80%);
    }
    color: $gray-600;
    &.selectable {
      .date-card:hover {
        background-color: white;
      }
      font-size: 1.7rem;
      font-style: italic;
    }
  }

  .date-card {
    margin: 0px 1.1rem;
    border-radius: 1rem;
    width: 10rem;
    padding: 1rem;

    position: relative;
    &::before {
      content: '﹀';
      position: absolute;
      display: block;
      width: 100%;
      height: var(--day-gutter);
      text-align: center;
      bottom: 100%;
      left: 0;
      color: $gray-600;
      transform: translateY(-1em);
      transition: transform 200ms ease-in-out;
    }
  }

  .weekday {
    font-size: 1.8rem;
  }
  .day {
    font-size: 2.5rem;
    font-weight: bold;
    white-space: nowrap;
  }

  .cpt-rdv {
    font-size: 1.6rem;
    text-align: center;
    white-space: nowrap;
    font-weight: bold;
    padding-top: 5px;
  }
}
