/* ------------------------------
　　カレンダー
------------------------------ */
.calendar-table {
  width: 100%;
  margin: 0 0 15px;
  table-layout: fixed;
  td {
    padding: 1px;
    color: $text-color-light;
    font-size: 14px;
    line-height: 2;
    text-align: center;
  }

  .week {
    color: $text-color-base;

    &.sat {
      color: $week-color-sat;
    }

    &.sun {
      color: $week-color-sun;
    }
  }

  .success {
    a {
      display: inline-block;
      width: 100%;
      height: 100%;
      background-color: $key-color;
      @include link-color(#FFF);
      @include transition-opacity();

      &:hover {
        opacity: $opacity-hover;
      }
    }
  }
}

/* ------------------------------
　　月間カレンダー
------------------------------ */
.calendar-month {
  margin: 0 0 30px;
  padding: 20px 10px;
  border: 1px solid $border-color-base;

  .year {
    margin: 0 0 3px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
  }

  .month {
    margin: 0 0 10px;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
  }

  .link-outer {
    margin: 0;
    text-align: center;
  }

  .link {
    font-size: 14px;
    @include link-color($text-color-light);
    @include only-underline-on-hover();
  }
}

/* ------------------------------
　　年間カレンダー
------------------------------ */
.calendar-year {
  .year-nav {
    position: relative;
    margin: 0 0 50px;
    padding: 0;
    text-align: center;
    list-style: none;
  }

  .year-nav-center {
    margin: 0 10px;
    color: $text-color-base;
    font-weight: bold;
    font-size: 28px;
  }

  .year-nav-prev-link,
  .year-nav-next-link {
    position: absolute;
    @include link-color($text-color-base);
    @include only-underline-on-hover();
    span {
      font-size: 20px;
    }
  }

  .year-nav-prev-link {
    top: 9px;
    left: calc(50% - 80px);
  }

  .year-nav-next-link {
    top: 9px;
    right: calc(50% - 80px);
  }

  .year-table {
    display: block;
    margin: 0 -15px;
  }

  .year-table-month {
    box-sizing: border-box;
    width: 100%;
    padding: 0 15px 35px;
  }

  .month-date-outer {
    margin: 0 0 10px;
    text-align: center;
  }

  .month-date {
    font-weight: bold;
    font-size: 20px;
    @include link-color($text-color-base);
    @include only-underline-on-hover();
  }
}

@media screen and (min-width: $breakpoint-sm-min) {
  .calendar-year {
    .year-table {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
    }
    .year-table-month {
      width: calc(100% / 2);
    }
  }
}

@media screen and (min-width: $breakpoint-md-min) {
  .calendar-year {
    .year-table-month {
      width: calc(100% / 3);
    }
  }
}
