/* =====================================================================
   cta-bar.css — スマホ専用 追従CTA（電話＋アクセス）
   宍戸動物病院 / 下部2ボタンCTA
   ===================================================================== */

.cta-bar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .cta-bar {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(calc(100% - 24px), 390px);
    height: 52px;
    background: transparent;
    transform: translate(-50%, calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s ease, opacity 0.32s ease;
  }

  .cta-bar.visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
  }

  .cta-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 52px;
    border-radius: 16px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 7px 18px rgba(44, 32, 23, 0.12);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .cta-bar__btn:active {
    opacity: 0.88;
    transform: translateY(1px);
  }

  .cta-bar__btn::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  .cta-bar__btn--tel {
    flex: 1 1 0;
    color: #fff;
    background: #C9923F;
  }

  .cta-bar__btn--tel::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.32 1.77.57 2.61a2 2 0 0 1-.45 2.11L8 9.67a16 16 0 0 0 6.33 6.33l1.23-1.23a2 2 0 0 1 2.11-.45c.84.25 1.71.45 2.61.57A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.32 1.77.57 2.61a2 2 0 0 1-.45 2.11L8 9.67a16 16 0 0 0 6.33 6.33l1.23-1.23a2 2 0 0 1 2.11-.45c.84.25 1.71.45 2.61.57A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  }

  .cta-bar__btn--access {
    flex: 1 1 0;
    color: #FCFAF6;
    background: #6A4742;
  }

  .cta-bar__btn--access::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  }

  @media (max-width: 374px) {
    body {
      padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .cta-bar {
      width: min(calc(100% - 20px), 390px);
      height: 50px;
      bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      gap: 7px;
    }

    .cta-bar__btn {
      height: 50px;
      font-size: 14px;
      letter-spacing: 0.01em;
    }

    .cta-bar__btn::before {
      width: 17px;
      height: 17px;
      margin-right: 7px;
    }
  }
}
