@charset "UTF-8";
/* ==================================================
   Servi Plus フローティングCTA
================================================== */

.delivery-floating-cta,
.delivery-floating-cta *,
.delivery-floating-cta *::before,
.delivery-floating-cta *::after {
  box-sizing: border-box;
}

.delivery-floating-cta {
  --delivery-cta-accent: #151515;
  --delivery-cta-accent-hover: #333;
  --delivery-cta-text: #151515;
  --delivery-cta-white: #fff;

  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9990;

  width: 260px;
  max-width: calc(100vw - 48px);

  font-family:
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo",
    sans-serif;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);

  transition:
    width 0.3s ease,
    height 0.3s ease,
    right 0.3s ease,
    bottom 0.3s ease,
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
}

/* スクロール後の表示状態 */
.delivery-floating-cta.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ==================================================
   CTAパネル
================================================== */

.delivery-floating-cta__panel {
  width: 100%;

  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: scale(1);
  transform-origin: right bottom;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

/* CONTACT見出し */
.delivery-floating-cta__title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 8px 16px;
  color: var(--delivery-cta-white);
  background-color: var(--delivery-cta-accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
  border-radius: 4px 4px 0 0;
  border: 1px solid #fff;
}

/* CTAボタンを囲む白いエリア */
.delivery-floating-cta__body {
  display: grid;
  gap: 12px;

  padding: 16px 14px 18px;

  background-color: var(--delivery-cta-white);
  border-radius: 0 0 4px 4px;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==================================================
   CTAボタン共通
================================================== */

.delivery-floating-cta__link {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 10px 16px;

  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none !important;

  border: 1px solid var(--delivery-cta-accent);
  border-radius: 999px;

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

/* 無料相談ボタン */
.delivery-floating-cta__link--contact,
.delivery-floating-cta__link--contact:link,
.delivery-floating-cta__link--contact:visited {
  color: var(--delivery-cta-white) !important;
  background-color: var(--delivery-cta-accent);
  border-color: var(--delivery-cta-accent);
}

/* 資料ダウンロードボタン */
.delivery-floating-cta__link--download,
.delivery-floating-cta__link--download:link,
.delivery-floating-cta__link--download:visited {
  color: var(--delivery-cta-text) !important;
  background-color: var(--delivery-cta-white);
  border-color: var(--delivery-cta-accent);
}

/* ==================================================
   PCホバー
================================================== */

@media (hover: hover) and (pointer: fine) {
  .delivery-floating-cta__link:hover {
    text-decoration: none !important;
    transform: translateY(-1px);
  }

  .delivery-floating-cta__link--contact:hover {
    color: var(--delivery-cta-white) !important;
    background-color: var(--delivery-cta-accent-hover);
    border-color: var(--delivery-cta-accent-hover);
  }

  .delivery-floating-cta__link--download:hover {
    color: var(--delivery-cta-white) !important;
    background-color: var(--delivery-cta-accent);
    border-color: var(--delivery-cta-accent);
  }
}

/* フォーカス時の色を固定 */
.delivery-floating-cta__link--contact:focus,
.delivery-floating-cta__link--contact:focus-visible,
.delivery-floating-cta__link--contact:active {
  color: var(--delivery-cta-white) !important;
}

.delivery-floating-cta__link--download:focus,
.delivery-floating-cta__link--download:focus-visible {
  color: var(--delivery-cta-text) !important;
}

/* ==================================================
   開閉ボタン
================================================== */

.delivery-floating-cta__toggle {
  position: absolute;
  top: -17px;
  right: -17px;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;

  appearance: none;
  cursor: pointer;

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98),
    rgba(165, 165, 165, 0.96)
  );

  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);

  transition:
    top 0.3s ease,
    right 0.3s ease,
    width 0.3s ease,
    height 0.3s ease,
    transform 0.2s ease;
}

.delivery-floating-cta__toggle:hover {
  transform: scale(1.05);
}

/* ×／＋アイコン */
.delivery-floating-cta__toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.delivery-floating-cta__toggle-icon::before,
.delivery-floating-cta__toggle-icon::after {
  position: absolute;
  top: 7px;
  left: 1px;

  display: block;
  width: 14px;
  height: 2px;

  content: "";
  background-color: #fff;
  border-radius: 2px;

  transition: transform 0.25s ease;
}

/* 開いている状態：× */
.delivery-floating-cta__toggle-icon::before {
  transform: rotate(45deg);
}

.delivery-floating-cta__toggle-icon::after {
  transform: rotate(-45deg);
}

/* ==================================================
   最小化状態
================================================== */

.delivery-floating-cta.is-collapsed {
  width: 44px;
  height: 44px;
  max-width: none;
}

.delivery-floating-cta.is-collapsed .delivery-floating-cta__panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.8);
}

.delivery-floating-cta.is-collapsed .delivery-floating-cta__toggle {
  top: 0;
  right: 0;

  width: 44px;
  height: 44px;
}

/* 最小化状態：＋ */
.delivery-floating-cta.is-collapsed
  .delivery-floating-cta__toggle-icon::before {
  transform: rotate(0deg);
}

.delivery-floating-cta.is-collapsed .delivery-floating-cta__toggle-icon::after {
  transform: rotate(90deg);
}

/* ==================================================
   キーボード操作
================================================== */

.delivery-floating-cta__link:focus-visible,
.delivery-floating-cta__toggle:focus-visible {
  outline: 3px solid #2477d4;
  outline-offset: 3px;
}

/* ==================================================
   スマートフォン
================================================== */

@media screen and (max-width: 768px) {
  .delivery-floating-cta {
    right: 0;
    bottom: 0;
    left: 0;

    width: 100%;
    max-width: none;

    transform: translateY(100%);
  }

  .delivery-floating-cta.is-visible {
    transform: translateY(0);
  }

  /* スマホではCONTACT見出しを非表示 */
  .delivery-floating-cta__title {
    display: none;
  }

  .delivery-floating-cta__panel {
    transform-origin: right bottom;
  }

  .delivery-floating-cta__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;

    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);

    border-radius: 0;

    box-shadow:
      0 -4px 18px rgba(0, 0, 0, 0.14),
      0 -1px 4px rgba(0, 0, 0, 0.08);
  }

  .delivery-floating-cta__link {
    min-width: 0;
    min-height: 72px;
    padding: 12px 8px;

    font-size: 16px;
    line-height: 1.4;
    white-space: nowrap;

    border-radius: 0;
    transform: none;
  }

  /* 左：お問い合わせ */
  .delivery-floating-cta__link--contact,
  .delivery-floating-cta__link--contact:link,
  .delivery-floating-cta__link--contact:visited,
  .delivery-floating-cta__link--contact:hover,
  .delivery-floating-cta__link--contact:focus,
  .delivery-floating-cta__link--contact:active {
    color: #fff !important;
    background-color: var(--delivery-cta-accent);
    border: 0;
  }

  /* 右：資料ダウンロード */
  .delivery-floating-cta__link--download,
  .delivery-floating-cta__link--download:link,
  .delivery-floating-cta__link--download:visited,
  .delivery-floating-cta__link--download:hover,
  .delivery-floating-cta__link--download:focus,
  .delivery-floating-cta__link--download:active {
    color: var(--delivery-cta-text) !important;
    background-color: #fff;
    border: 0;
    border-left: 1px solid #ddd;
  }

  /* スマホ開閉ボタン */
  .delivery-floating-cta__toggle {
    top: -22px;
    right: 12px;

    width: 44px;
    height: 44px;
  }

  /* スマホ最小化時 */
  .delivery-floating-cta.is-collapsed {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: auto;

    width: 44px;
    height: 44px;
  }

  .delivery-floating-cta.is-collapsed .delivery-floating-cta__toggle {
    top: 0;
    right: 0;
  }
}

/* ==================================================
   小さいスマートフォン
================================================== */

@media screen and (max-width: 374px) {
  .delivery-floating-cta__link {
    min-height: 66px;
    padding-right: 5px;
    padding-left: 5px;

    font-size: 14px;
  }
}

/* ==================================================
   アニメーション軽減設定
================================================== */

@media (prefers-reduced-motion: reduce) {
  .delivery-floating-cta,
  .delivery-floating-cta__panel,
  .delivery-floating-cta__link,
  .delivery-floating-cta__toggle,
  .delivery-floating-cta__toggle-icon::before,
  .delivery-floating-cta__toggle-icon::after {
    transition: none;
  }
}
