@charset "UTF-8";

/* ========================================
 * CSS変数（カラー・共通値）
 * ======================================== */

:root {
  /* フォントファミリー */
  --fuwel-font-system: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Hiragino Kaku Gothic ProN", "游ゴシック Medium", Meiryo, "Open Sans",
    sans-serif;
  --fuwel-font-lato: Lato, sans-serif;
  --fuwel-font-didot: linotype-didot, serif;

  /* ブランドカラー */
  --fuwel-color-primary: #f1a49f;
  --fuwel-color-accent: #b3a17d;

  /* テキストカラー */
  --fuwel-color-text: #000;
  --fuwel-color-text-muted: #000;
  --fuwel-color-text-disabled: #ccc;

  /* 曜日カラー */
  --fuwel-color-bg-weekday: #fff;
  --fuwel-color-saturday: #0059b3;
  --fuwel-color-saturday-bg: #fff;
  --fuwel-color-holiday: #e62e2e;
  --fuwel-color-holiday-bg: #fff;
  --fuwel-color-today-border: 2px solid #b3a17d;

  /* ボーダー・背景 */
  --fuwel-color-border: #e6e6e6;

  /* その他 */

  /* ブレークポイント */
  --fuwel-bp-tablet: 768px;

  /* カレンダーサイズ */
  --fuwel-calendar-width-sp: 100%;
  --fuwel-calendar-width-pc: 100%;

  --flatpickr-prev-next-month-date-color: transparent;
  --flatpickr-col-weekday-text: uppercase;
  --flatpickr-col-weekday-border: 0.5px solid #e6e6e6;
  --flatpickr-col-weekday-width-sp: calc(100% / 7);
  --flatpickr-col-weekday-width-pc: calc(100% / 7);
  --flatpickr-col-weekday-height: calc(100% / 7);
  --flatpickr-col-weekday-font-size-sp: 10px;
  --flatpickr-col-weekday-font-size-pc: 12px;
  --flatpickr-col-weekday-font-family: "Josefin Sans,sans-serif";
  --flatpickr-col-day-border: 0.5px solid #e6e6e6;
  --flatpickr-col-day-width-sp: calc(100% / 7);
  --flatpickr-col-day-width-pc: calc(100% / 7);
  --flatpickr-col-day-height-sp: 47.59px;
  --flatpickr-col-day-height-pc: 72.7px;
  --flatpickr-col-day-font-size-sp: 16px;
  --flatpickr-col-day-font-size-pc: 22px;
  --flatpickr-col-day-font-weight: 700;
  --flatpickr-col-day-text-decoration: underline;
  --flatpickr-col-day-selected-border-color: #e6e6e6;
  --flatpickr-col-day-selected-background-color: #fff;
}

/* ========================================
 * リセットクラス
 * ======================================== */

#fuwel-search-widget-modal {
  -webkit-font-smoothing: antialiased;

  /* 全要素共通リセット */
  .u-reset {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-decoration: none;
    list-style: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    vertical-align: baseline;

    &:focus,
    &:active {
      outline: none;
    }
  }
}

/* ========================================
 * 外部サイト用スタイル
 * ======================================== */

.fuwel-blur-filter {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  filter: blur(12px);
  background-color: rgb(255 255 255 / 55%);
  width: 100vw;
  height: 100vh;
  opacity: 1;
}

#fuwel-search-widget {
  width: 100%;
  border: none;
}

/* ========================================
 * モーダル
 * ======================================== */

#fuwel-search-widget-modal {
  font-family: var(--fuwel-font-system);

  /* --- オーバーレイ --- */
  .fuwel-modal__overlay {
    display: flex;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 10px;
    transition: all 0.7s;
    font-family: var(--fuwel-font-lato);
    justify-content: center;
    align-items: center;

    &.fuwel-modal-open {
      visibility: visible;
      opacity: 1;
    }
  }

  /* --- モーダルコンテナ --- */
  .fuwel-modal__container {
    box-sizing: border-box;
    position: relative;
    padding: 19px;
    border: 1px solid var(--fuwel-color-border);
    max-width: 500px;
    background: #fff;
    text-align: center;
    width: 100%;

    @media screen and (min-width: 768px) {
      padding: 39px;
    }

    &:before {
      content: "";
      display: block;
      position: absolute;
      top: 3px;
      right: 3px;
      bottom: 3px;
      left: 3px;
      border: 1px solid #f2f2f2;
      pointer-events: none;
    }
  }

  /* --- 閉じるボタン --- */
  .fuwel-modal__close-wrap {
      position: relative;
      top: unset;
      right: unset;

    .fuwel-modal__close-btn {
      position: relative;
      padding: 0;
      border: 0;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      cursor: pointer;
      background: var(--fuwel-color-accent);
      font-size: 0;
      -webkit-appearance: none;

      .fuwel-modal__close_close_ico {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;

        &:before,
        &:after {
          content: "";
          display: block;
          position: absolute;
          top: 50%;
          right: 0;
          left: 0;
          margin: -1px auto 0;
          width: 50%;
          height: 2px;
          background: #fff;
        }

        &:before {
          transform: rotate(45deg);
        }
        &:after {
          transform: rotate(-45deg);
        }
      }
    }

    @media screen and (min-width: 768px) {
      position: absolute;
      top: -20px;
      right: -20px;
    }
  }

  /* --- モーダルヘッダー --- */
  .fuwel-modal__header {
    padding: 1px 0 0;
    border-top: 2px solid var(--fuwel-color-accent);
    border-bottom: 2px solid var(--fuwel-color-accent);
  }

  .fuwel-modal__header__title {
    padding: 12px 0 6px;
    border-top: 1px solid var(--fuwel-color-accent);
    border-bottom: 1px solid var(--fuwel-color-accent);
    font-family: var(--fuwel-font-didot);
    font-size: 32px;
    font-weight: 400;
    line-height: 1;

    @media screen and (min-width: 768px) {
      padding-top: 15px;
      font-size: 44px;
    }
  }

  .fuwel-modal__header__month {
    white-space: nowrap;
    padding: 2px 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;

    @media screen and (min-width: 768px) {
      font-size: 14px;
    }

    .fuwel-modal__header__month-num {
      font-size: 16px;
      font-style: normal;
      @media screen and (min-width: 768px) {
        font-size: 22px;
      }
    }
  }

  .fuwel-modal__header__year {
  }


  /* --- コンテンツエリア --- */
  .fuwel-modal__content {
    overflow: auto;
    height: 100%;
  }

  /* --- カレンダーエリア --- */
  .fuwel-modal__calendar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  /* --- カレンダーリセット --- */
  .fuwel-modal__calendar__reset-wrap {
    box-sizing: border-box;
    text-align: right;
    width: 100%;
    margin-top: 10px;
    padding-right: 15px;

    @media screen and (min-width: 768px) {
      max-width: var(--fuwel-calendar-width-pc);
      margin-right: auto;
      margin-left: auto;
      padding-right: 0;
    }
  }

  .fuwel-modal__calendar__reset-btn {
    display: inline-block;
    padding: 0;
    font-size: 12px;
    text-decoration: underline;
    margin-left: auto;
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  /* --- 送信ボタンエリア --- */
  .fuwel-modal__calendar__submit-wrap {
    box-sizing: border-box;
    width: 100%;
    padding: 15px;
    background-color: #fff;
  }

  .fuwel-modal__calendar__submit-btn {
    position: relative;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 0 15px;
    background-color: var(--fuwel-color-primary) !important;
    border: 1px solid var(--fuwel-color-primary) !important;
    border-radius: 3px;
    font-size: 18px !important;
    color: #fff;
    margin-right: auto;
    margin-left: auto;
    cursor: pointer;

    &::before {
      display: inline-block;
      content: "";
      position: absolute;
      top: 50%;
      right: 15px;
      width: 8px;
      height: 12px;
      background-image: url("./icon/icon-chevron-white.svg");
      background-repeat: no-repeat;
      background-size: 100%;
      transform: translateY(-50%);
    }

    &:focus,
    &:active {
      outline: none;
    }

    @media screen and (min-width: 768px) {
      max-width: 400px;
    }
  }

  /* ========================================
   * Flatpickr カスタマイズ
   * ======================================== */

  .flatpickr-calendar {
    opacity: 0;
    display: none;
    text-align: center;
    visibility: hidden;
    padding: 0;
    animation: none;
    direction: ltr;
    border: 0;
    font-size: 14px;
    line-height: 24px;
    border-radius: 5px;
    position: absolute;
    box-sizing: border-box;
    touch-action: manipulation;
    background: #fff;
    box-shadow: 1px 0 0 var(--fuwel-color-border), -1px 0 0 var(--fuwel-color-border), 0 1px 0 var(--fuwel-color-border),
      0 -1px 0 var(--fuwel-color-border), 0 3px 13px rgba(0, 0, 0, 0.08);

    &.open,
    &.inline {
      opacity: 1;
      /* max-height: 640px; */
      visibility: visible;
    }

    &.open {
      display: inline-block;
      z-index: 99999;
    }

    &.animate.open {
      animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    &.inline {
      display: flex;
      flex-direction: column-reverse;
      position: relative;
    }

    &:focus {
      outline: 0;
    }
  }

  .flatpickr-calendar,
  .flatpickr-rContainer,
  .flatpickr-days,
  .dayContainer {
    width: 100%;
    max-width: 100%;
    min-width: 100%;

    @media screen and (min-width: 768px) {
      width: var(--fuwel-calendar-width-pc);
      max-width: var(--fuwel-calendar-width-pc);
      min-width: var(--fuwel-calendar-width-pc);
    }
  }

  .flatpickr-calendar {
    box-shadow: none;
  }

  .flatpickr-wrapper {
    position: relative;
    display: inline-block;
  }

  .flatpickr-months {
    display: flex;
    justify-content: space-between;

    .flatpickr-month {
      background: transparent;
      color: rgba(0, 0, 0, 0.9);
      fill: rgba(0, 0, 0, 0.9);
      height: 34px;
      line-height: 1;
      text-align: center;
      position: relative;
      user-select: none;
      overflow: hidden;
      flex: 1;
    }

    .flatpickr-prev-month,
    .flatpickr-next-month {
      text-decoration: none;
      font-size: 10px;
      cursor: pointer;
      &.flatpickr-disabled {
        opacity: 0.4;
        cursor: default;
      }
      @media screen and (min-width: 768px) {
        font-size: 12px;
      }
    }

    .flatpickr-next-month::after {
      display: inline-block;
      content: "";
      width: 6px;
      height: 10px;
      margin-left: 4px;
      background-image: url("./icon/arw_gold_right.png");
      vertical-align: middle;
      background-repeat: no-repeat;
      background-size: 100%;
    }

    .flatpickr-prev-month::before {
      display: inline-block;
      content: "";
      width: 6px;
      height: 10px;
      margin-right: 4px;
      background-image: url("./icon/arw_gold_right.png");
      vertical-align: middle;
      background-repeat: no-repeat;
      background-size: 100%;
      transform: scale(-1, 1);
    }
  }

  .flatpickr-current-month {
    color: inherit;
    position: absolute;
    width: 75%;
    left: 12.5%;
    padding: 7.48px 0 0 0;
    line-height: 1;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transform: translate3d(0, 0, 0);
    font-size: 18px;
    font-weight: bold;

    &::after {
      content: "年";
      order: 2;
      margin-left: 0.2em;
      transform: translateY(1px);
    }

    .cur-month,
    .flatpickr-monthDropdown-months {
      order: 3;
      font-weight: bold;
      font-size: 18px;
      padding: 0;
      margin-left: 0.5em;
      transform: translateY(1px);
      appearance: none;
    }

    .numInputWrapper {
      order: 1;
      width: 2.6em;
      top: 1px;
      background: transparent !important;
      position: relative;
      height: auto;
      display: inline-block;

      span {
        pointer-events: none;
        display: none !important;
      }

      input {
        padding: 0;
        pointer-events: none;
        appearance: none;
        background: inherit !important;
        width: 100%;
        font-size: 18px;
        font-weight: bold;

        &:hover {
          appearance: none;
        }
      }
    }

    input.cur-year {
      font-size: 18px;
      font-weight: bold;
      background: transparent;
      box-sizing: border-box;
      color: inherit;
      cursor: text;
      padding: 0 0 0 0.5ch;
      margin: 0;
      display: inline-block;
      font-family: inherit;
      line-height: inherit;
      height: auto;
      border: 0;
      border-radius: 0;
      vertical-align: initial;
      appearance: textfield;

      &:focus {
        outline: 0;
      }

      &[disabled],
      &[disabled]:hover {
        font-size: 100%;
        color: rgba(0, 0, 0, 0.5);
        background: transparent;
        pointer-events: none;
      }
    }

    .flatpickr-monthDropdown-months {
      background: transparent;
      border: none;
      border-radius: 0;
      box-sizing: border-box;
      color: inherit;
      cursor: pointer;
      font-family: inherit;
      height: auto;
      line-height: inherit;
      margin: -1px 0 0 0;
      outline: none;
      position: relative;
      vertical-align: initial;
      width: auto;

      &:focus,
      &:active {
        outline: none;
      }

      &:hover {
        background: rgba(0, 0, 0, 0.05);
      }
    }
  }

  .flatpickr-weekdays {
    background: transparent;
    text-align: center;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;

    .flatpickr-weekdaycontainer {
      display: flex;
      justify-content: center;
      flex: 1;
    }
  }

  span.flatpickr-weekday {
    box-sizing: border-box;
    cursor: default;
    background: transparent;
    text-align: center;
    display: block;
    font-weight: bolder;
    padding-top: 4px;
    line-height: 1.6;
    width: var(--flatpickr-col-weekday-width-sp);
    color: var(--fuwel-color-text-muted);
    font-size: var(--flatpickr-col-weekday-font-size-sp);
    font-family: var(--flatpickr-col-weekday-font-family);
    background-color: var(--fuwel-color-bg-weekday);
    border: var(--flatpickr-col-weekday-border);
    text-transform: var(--flatpickr-col-weekday-text);

    &:nth-child(6) {
      background-color: var(--fuwel-color-saturday-bg);
      color: var(--fuwel-color-saturday);
    }

    &:nth-child(7) {
      background-color: var(--fuwel-color-holiday-bg);
      color: var(--fuwel-color-holiday);
    }

    @media screen and (min-width: 768px) {
      width: var(--flatpickr-col-weekday-width-pc);
      font-size: var(--flatpickr-col-weekday-font-size-pc);
    }
  }

  .dayContainer,
  .flatpickr-weeks {
    padding: 1px 0 0 0;
  }

  .flatpickr-days {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;

    &:focus {
      outline: 0;
    }
  }

  .dayContainer {
    padding: 0;
    outline: 0;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    transform: translate3d(0, 0, 0);
    opacity: 1;

    & + .dayContainer {
      box-shadow: -1px 0 0 var(--fuwel-color-border);
    }
  }

  .flatpickr-day {
    background: none;
    border: var(--flatpickr-col-day-border);
    box-sizing: border-box;
    color: var(--fuwel-color-text);
    cursor: pointer;
    font-weight: var(--flatpickr-col-day-font-weight);
    width: var(--flatpickr-col-day-width-sp);
    height: var(--flatpickr-col-day-height-sp);
    font-size: var(--flatpickr-col-day-font-size-sp);
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    text-decoration: var(--flatpickr-col-day-text-decoration);

    @media screen and (min-width: 768px) {
      width: var(--flatpickr-col-day-width-pc);
      height: var(--flatpickr-col-day-height-pc);
      font-size: var(--flatpickr-col-day-font-size-pc);
    }

    &.saturday {
      color: var(--fuwel-color-saturday);
    }

    &.holiday {
      color: var(--fuwel-color-holiday);
    }

    &.today {
      border: var(--fuwel-color-today-border);
    }

    &.selected {
      background-color: var(--flatpickr-col-day-selected-background-color);
      border-color: var(--flatpickr-col-day-selected-border-color);
    }

    &.flatpickr-disabled {
      color: var(--fuwel-color-text-disabled);
      text-decoration: none;
      cursor: default;
    }

    &.prevMonthDay,
    &.nextMonthDay {
      color: var(--flatpickr-prev-next-month-date-color);
      cursor: default;
      pointer-events: none;
    }
  }

  .flatpickr-innerContainer {
    display: flex;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 16px;
  }

  .flatpickr-rContainer {
    display: inline-block;
    padding: 0;
    box-sizing: border-box;
  }

  .flatpickr-input {
    display: none;

    &[readonly] {
      cursor: pointer;
    }
  }
}

/* ========================================
 * アニメーション
 * ======================================== */

@keyframes fpFadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
