@import "../variables";

.root {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;

  min-height: 98px;
  padding: 20px;
  line-height: 1.3;
  font-weight: 400;
  border-top-left-radius: $borderRadius;
  border-top-right-radius: $borderRadius;

  &.landscape {
    align-items: flex-start;
    min-width: 200px;
    border-top-right-radius: 0;
    border-bottom-left-radius: $borderRadius;

    .dateWrapper.day {
      flex-grow: 1;
      height: 76px;
    }
  }
}

.wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  cursor: pointer;

  &.blank {
    height: 58px;
    line-height: 58px;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    cursor: default;
  }
}

.dateWrapper {
  position: relative;
  display: block;
  overflow: hidden;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s ease;

  &.active {
    color: rgb(255,255,255);
  }
  &.day {
    height: 38px;
    font-size: 36px;
    line-height: 36px;
    text-transform: capitalize;
  }
  &.year {
    height: 20px;
    font-size: 18px;
    line-height: 18px;
  }
}
.date {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.range {
  display: flex;
  flex-grow: 1;

  .dateWrapper {
    overflow: visible;
  }
  
  .wrapper {
    &:first-child {
      &:before, &:after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 0;
        height: 0;
        margin-top: -50px;
        margin-left: -50px;

        border-top: 100px solid transparent;
        border-bottom: 100px solid transparent;

        border-left: 60px solid;
      }

      &:before {
        color: rgba(255,255,255, 0.15);
        transform: translateX(1px);
      }
    }
    &:last-child {
      margin-left: 60px;
    }

    .date {
      white-space: nowrap;
      z-index: 1;
    }
  }
}
