@charset "UTF-8";
/* ============================================================
   食品から探す - 食品追加リクエスト（ボタン＋モーダル）
   マークアップ: cakephp/templates/element/CustomerProcessFlow/food_request_modal.php
   挙動: /files/js/customer_process_flow_food_request.js
   食品選択ページ（food.php）だけで読み込む。共用の customer_process_flow.css には足さない
   （他の工程別フローページへ波及させないため）。

   z-index: 固定ヘッダー（header.css 998 / SP メニュー 999）より上、
            離脱モーダル（customer_exit_modal 9000 / 9999）より下に置く。
   ============================================================ */

/* JS で付け外しする hidden 属性を、下の display 指定で上書きしない */
.pf-food-request [hidden] {
  display: none !important;
}

/* 共通 style.css の [aria-hidden=true]{display:none;visibility:hidden} を打ち消す。
   読み上げ対象から外すために aria-hidden を付けた装飾（ボタンのアイコン・イラストの仮装飾）も表示する。
   読み込み順に頼らないよう、属性セレクター（0,1,0）より詳細度を上げて書く */
.pf-food-request .pf-food-request__open-icon {
  display: inline-flex;
  visibility: visible;
}
.pf-food-request .pf-food-request__open-icon svg {
  display: block;
  visibility: visible;
}
.pf-food-request .pf-food-request__illust--placeholder {
  display: block;
  visibility: visible;
}

/* ダイアログ内の p は、共通 style.css の .search p（767px 以下で font-size:1.3rem;line-height:1.615。
   html の font-size が vw 連動のため 640〜767px では 20px を超える）に負けないよう
   .pf-food-request p.xxx（0,2,1）で書く */

/* --- 配置（PC: 見出しの右上） --- */
.pf-hero--food-request {
  position: relative;
}
.pf-food-request {
  position: absolute;
  top: 24px;
  right: 0;
  z-index: 50;
  text-align: left;
}

/* --- 起動ボタン（赤のピル型） --- */
.pf-food-request__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 40px 10px 16px;
  position: relative;
  border: 0;
  border-radius: 999px;
  background: #e60012;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(230, 0, 18, 0.35);
  transition: opacity 0.2s;
}
.pf-food-request__open:hover {
  opacity: 0.85;
}
.pf-food-request__open:focus-visible,
.pf-food-request__close:focus-visible,
.pf-food-request__submit:focus-visible,
.pf-food-request__done-close:focus-visible {
  outline: 3px solid #222;
  outline-offset: 2px;
}
.pf-food-request__open::after,
.pf-food-request__submit::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}
.pf-food-request__open::after {
  right: 18px;
}
.pf-food-request__open-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #fff;
}
.pf-food-request__open-icon svg {
  display: block;
}

/* --- ダイアログ（PC: ボタン直下に右揃えのポップアップ。背景の暗転なし） --- */
.pf-food-request__backdrop {
  display: none;
}
.pf-food-request__dialog {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 50;
  box-sizing: border-box;
  width: 400px;
  padding: 28px 24px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  color: #222;
  text-align: left;
}

/* 閉じる（×） */
.pf-food-request__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pf-food-request__close::before,
.pf-food-request__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #222;
}
.pf-food-request__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.pf-food-request__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* --- 見出し部 --- */
.pf-food-request__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.pf-food-request__illust {
  display: block;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
}
/* 素材受領までの仮装飾（淡い赤丸＋吹き出しマーク） */
.pf-food-request__illust--placeholder {
  position: relative;
  border-radius: 50%;
  background: #fdecee;
}
.pf-food-request__illust--placeholder::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 18px;
  width: 36px;
  height: 26px;
  border-radius: 6px;
  background: #e60012;
}
.pf-food-request__illust--placeholder::after {
  content: "";
  position: absolute;
  top: 44px;
  left: 24px;
  border-top: 8px solid #e60012;
  border-right: 8px solid transparent;
}
.pf-food-request__head-text {
  flex: 1;
  min-width: 0;
}
.pf-food-request p.pf-food-request__title {
  /* 1 行目（「こんな食品も」）が閉じるボタンに重ならない程度に右を空ける */
  margin: 0 0 8px;
  padding-right: 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}
.pf-food-request__em {
  color: #e60012;
  font-style: normal;
}
.pf-food-request p.pf-food-request__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* --- フォーム --- */
.pf-food-request__form {
  margin: 0;
}
.pf-food-request p.pf-food-request__message {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #e60012;
  border-radius: 6px;
  background: #fdecee;
  color: #e60012;
  font-size: 14px;
  line-height: 1.5;
}
.pf-food-request__field {
  margin-bottom: 20px;
}
.pf-food-request__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
}
.pf-food-request__required {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e60012;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.pf-food-request__input,
.pf-food-request__textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #222;
  /* 16px 未満だと iOS Safari がフォーカス時にズームする */
  font-size: 16px;
  line-height: 1.5;
}
.pf-food-request__textarea {
  min-height: 96px;
  resize: vertical;
}
.pf-food-request__input::placeholder,
.pf-food-request__textarea::placeholder {
  color: #999;
}
.pf-food-request__input:focus,
.pf-food-request__textarea:focus {
  outline: 2px solid #e60012;
  outline-offset: 0;
  border-color: #e60012;
}
.pf-food-request p.pf-food-request__error {
  margin: 6px 0 0;
  color: #e60012;
  font-size: 13px;
  line-height: 1.5;
}

/* 送信ボタン */
.pf-food-request__submit {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 40px;
  border: 0;
  border-radius: 999px;
  background: #e60012;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(230, 0, 18, 0.35);
  transition: opacity 0.2s;
}
.pf-food-request__submit::after {
  right: 24px;
}
.pf-food-request__submit:hover {
  opacity: 0.85;
}
.pf-food-request__submit:disabled,
.pf-food-request__form.is-sending .pf-food-request__submit {
  opacity: 0.6;
  cursor: wait;
}

/* --- 完了表示 --- */
.pf-food-request__done {
  padding: 8px 0 0;
  text-align: center;
}
.pf-food-request p.pf-food-request__done-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #e60012;
}
.pf-food-request p.pf-food-request__done-text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
}
.pf-food-request__done-close {
  display: inline-block;
  min-width: 160px;
  margin: 0;
  padding: 10px 24px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ============================================================
   タブレット・SP（〜1023px）
   ボタンは lead の下に中央寄せ（右上だと中央の見出しと重なる）。
   ダイアログは画面中央の固定カード＋暗転背景。
   ============================================================ */
@media screen and (max-width: 1023px) {
  .pf-food-request {
    position: static;
    margin-top: 16px;
    text-align: center;
  }
  .pf-food-request__backdrop {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
  }
  .pf-food-request__dialog {
    position: fixed;
    top: 50%;
    right: 16px;
    left: 16px;
    z-index: 1001;
    width: auto;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-50%);
  }
  body.is-pf-food-request-open {
    overflow: hidden;
  }
}

@media screen and (max-width: 639px) {
  .pf-food-request__dialog {
    padding: 24px 16px 20px;
  }
  .pf-food-request__illust {
    width: 56px;
    height: 56px;
  }
  .pf-food-request__illust--placeholder::before {
    top: 15px;
    left: 13px;
    width: 30px;
    height: 22px;
  }
  .pf-food-request__illust--placeholder::after {
    top: 36px;
    left: 18px;
  }
  .pf-food-request p.pf-food-request__title {
    font-size: 19px;
  }
  .pf-food-request p.pf-food-request__lead {
    font-size: 13px;
  }
  .pf-food-request__br-pc {
    display: none;
  }
  .pf-food-request__submit {
    font-size: 16px;
  }
}
