/**
 * ギャッベクリーニング見積もりフォーム CSS
 * gabbeh.co.jp 本番用
 *
 * テーマ既存クラス (ask_list, title, line, left, right, kome) を活用
 * 独自CSSはギャッベサイズ入力・写真・見積もり表示・梱包キット無料バナーのみ
 */

/* === WP autopが挿入する<p>タグを無害化 === */
.gabbeh-form p { margin: 0; padding: 0; }
.gabbeh-form .wpcf7-form-control-wrap { display: block; }
.gabbeh-form .size-field .wpcf7-form-control-wrap,
.gabbeh-form .line .wpcf7-form-control-wrap { display: inline; }
/* テーマが.wpcf7-form-controlの幅を潰すのを上書き */
.gabbeh-form span.wpcf7-radio,
.gabbeh-form span.wpcf7-checkbox { width: 100% !important; }
.gabbeh-form .title p,
.gabbeh-form .plan-note p,
.gabbeh-form .gabbeh-intro p,
.gabbeh-form .option-group-title p,
.gabbeh-form .option-note p,
.gabbeh-form .free-packing-banner p,
.gabbeh-form .gabbeh-photos-label p,
.gabbeh-form .area-display p,
.gabbeh-form .gabbeh-item-label p { display: inline; }
.gabbeh-form .size-field p,
.gabbeh-form .size-row > p,
.gabbeh-form .photo-mini-slot p,
.gabbeh-form .qty-inline p { display: contents; }
.gabbeh-form .plan-select p,
.gabbeh-form .care-select p,
.gabbeh-form .delivery-select p,
.gabbeh-form .options-checks > p { display: block; margin: 0; }
.gabbeh-form .left p,
.gabbeh-form .right p { display: inline; }
/* テーマがtext/emailだけwidth:100%にしてtel/numberを小さくする問題を修正 */
.gabbeh-form .line .right .wpcf7-form-control { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }

/* === 梱包キット無料バナー === */
.gabbeh-form .free-packing-banner {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

/* === プラン選択 === */
.gabbeh-form .plan-select .wpcf7-radio { display: flex; flex-direction: column; gap: 8px; }
.gabbeh-form .plan-select .wpcf7-list-item { display: block; margin: 0; }
.gabbeh-form .plan-select .wpcf7-list-item label {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 16px; border: 1px solid #ddd; cursor: pointer; transition: all 0.2s; line-height: 1.6;
}
.gabbeh-form .plan-select .wpcf7-list-item label:hover { border-color: #999; background: rgba(0,0,0,0.02); }
.gabbeh-form .plan-select .wpcf7-list-item:has(input:checked) label { border-color: #333; border-width: 2px; background: rgba(0,0,0,0.02); }
.gabbeh-form .plan-select .wpcf7-list-item input[type="radio"] { margin-top: 3px; flex-shrink: 0; }
.gabbeh-form .plan-select .wpcf7-list-item input:checked + .wpcf7-list-item-label { font-weight: 500; }
.gabbeh-form .plan-note { font-size: 11px; color: #999; margin-top: 10px; line-height: 1.7; }
.gabbeh-form .gabbeh-intro { font-size: 13px; color: #666; margin-bottom: 16px; line-height: 1.8; }

/* === ケアオプション === */
.gabbeh-form .care-select .wpcf7-radio { display: flex; flex-direction: column; gap: 4px; }
.gabbeh-form .care-select .wpcf7-list-item { display: block; margin: 0; }
.gabbeh-form .care-select .wpcf7-list-item label { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }

/* === 追加オプション === */
.gabbeh-form .options-checks .wpcf7-checkbox { display: flex; flex-direction: column; gap: 2px; }
.gabbeh-form .options-checks .wpcf7-list-item { display: block; margin: 0; }
.gabbeh-form .options-checks .wpcf7-list-item label { display: flex; align-items: center; gap: 8px; padding: 7px 0; cursor: pointer; }
.gabbeh-form .option-group-title { font-size: 13px; font-weight: 500; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid #eee; }
.gabbeh-form .option-group-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.gabbeh-form .option-note { font-size: 11px; color: #999; margin-left: 24px; margin-top: -2px; margin-bottom: 4px; }
.gabbeh-form .qty-inline { display: inline-flex; align-items: center; gap: 5px; margin-left: 24px; margin-top: 2px; margin-bottom: 6px; }
.gabbeh-form .qty-label { font-size: 12px; color: #666; }
.gabbeh-form .qty-inline input { width: 55px; padding: 4px 6px; text-align: center; }

/* === 配送方法 === */
.gabbeh-form .delivery-select .wpcf7-radio { display: flex; flex-direction: column; gap: 4px; }
.gabbeh-form .delivery-select .wpcf7-list-item { display: block; margin: 0; }
.gabbeh-form .delivery-select .wpcf7-list-item label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid rgba(170,170,170,0.48); cursor: pointer; transition: all 0.2s;
}
.gabbeh-form .delivery-select .wpcf7-list-item label:hover { border-color: #999; }
.gabbeh-form .delivery-select .wpcf7-list-item:has(input:checked) label { border-color: #333; background: rgba(0,0,0,0.02); }

/* === ギャッベサイズ入力 === */
.gabbeh-form .gabbeh-item {
  border: 1px solid #e0e0e0; padding: 16px 18px; margin-bottom: 10px;
  background: rgba(0,0,0,0.02); transition: all 0.2s;
}
.gabbeh-form .gabbeh-item.has-input { background: #fff; border-color: #ccc; }
.gabbeh-form .gabbeh-item.extra { display: none; }
.gabbeh-form .gabbeh-item.extra.show { display: block; }
.gabbeh-form .gabbeh-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gabbeh-form .gabbeh-item-label { font-size: 14px; font-weight: 500; }
.gabbeh-form .gabbeh-item-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #333; color: #fff; font-size: 11px; margin-right: 8px;
}
.gabbeh-form .gabbeh-item-subtotal { font-size: 15px; font-weight: 700; }
.gabbeh-form .gabbeh-item-body { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.gabbeh-form .gabbeh-size-area { flex: 1; min-width: 200px; }
.gabbeh-form .size-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gabbeh-form .size-field { display: flex; align-items: center; gap: 4px; }
.gabbeh-form .size-label { font-size: 13px; min-width: 20px; }
.gabbeh-form .size-field input[type="number"] { width: 90px; padding: 7px 8px; }
.gabbeh-form .size-unit { font-size: 12px; color: #999; }
.gabbeh-form .size-times { font-size: 16px; color: #aaa; }
.gabbeh-form .area-display { margin-top: 6px; font-size: 13px; }
.gabbeh-form .area-display strong { font-weight: 700; font-size: 15px; }

/* === 写真 === */
.gabbeh-form .gabbeh-photos-label { font-size: 11px; color: #999; margin-bottom: 5px; }
.gabbeh-form .photo-mini-grid { display: flex; gap: 5px; }
.gabbeh-form .photo-mini-slot {
  position: relative; width: 52px; height: 52px;
  border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; background: #fff;
}
.gabbeh-form .photo-mini-slot:hover { border-color: #999; }
.gabbeh-form .photo-mini-slot.has-photo { border-style: solid; border-color: #333; }
.gabbeh-form .photo-mini-slot .wpcf7-form-control-wrap { position: absolute; inset: 0; display: block; }
.gabbeh-form .photo-mini-slot input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.gabbeh-form .photo-mini-slot .icon { font-size: 16px; color: #bbb; pointer-events: none; }
.gabbeh-form .photo-mini-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gabbeh-form .photo-mini-slot .remove-btn {
  position: absolute; top: 1px; right: 1px; width: 16px; height: 16px;
  border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; border: none;
  cursor: pointer; font-size: 9px; display: flex; align-items: center; justify-content: center; z-index: 2;
}

/* === 追加ボタン === */
.gabbeh-form .add-gabbeh-btn {
  display: block; width: 100%; padding: 12px; margin-top: 6px;
  background: rgba(0,0,0,0.02); border: 1px dashed #ccc; color: #666;
  font-size: 13px; font-family: inherit; cursor: pointer; text-align: center;
}
.gabbeh-form .add-gabbeh-btn:hover { border-color: #999; color: #333; }
.gabbeh-form .add-gabbeh-btn.hidden { display: none; }

/* === スティッキーバー === */
.gabbeh-sticky-estimate {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #333; color: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
  z-index: 1000; transition: transform 0.35s ease; transform: translateY(100%);
}
.gabbeh-sticky-estimate.visible { transform: translateY(0); }
.gabbeh-sticky-inner { max-width: 860px; margin: 0 auto; padding: 10px 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gabbeh-sticky-label { font-size: 10px; color: rgba(255,255,255,0.6); letter-spacing: 0.1em; }
.gabbeh-sticky-price { font-size: 22px; font-weight: 700; }
.gabbeh-sticky-items { font-size: 11px; color: rgba(255,255,255,0.6); }
.gabbeh-sticky-detail-btn {
  padding: 8px 18px; background: rgb(215,207,179); border: none; color: #fff;
  font-size: 13px; font-family: inherit; cursor: pointer; letter-spacing: 0.1em;
}
.gabbeh-sticky-detail-btn:hover { opacity: 0.85; }

/* === 明細モーダル === */
.gabbeh-estimate-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
.gabbeh-estimate-overlay.open { display: flex; }
.gabbeh-estimate-modal { background: #fff; width: 100%; max-width: 860px; max-height: 75vh; overflow-y: auto; padding: 30px; }
.gabbeh-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #eee; }
.gabbeh-modal-title { font-size: 16px; font-weight: 500; letter-spacing: 0.1em; }
.gabbeh-modal-close { width: 30px; height: 30px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-size: 14px; color: #999; display: flex; align-items: center; justify-content: center; }
.gabbeh-modal-close:hover { border-color: #999; }
.gabbeh-modal-group { font-size: 12px; font-weight: 500; color: #333; margin-top: 16px; margin-bottom: 6px; padding-top: 12px; border-top: 1px solid #eee; }
.gabbeh-modal-group:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.gabbeh-modal-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.gabbeh-modal-row .label { color: #666; padding-right: 12px; }
.gabbeh-modal-row .price { font-weight: 500; }
.gabbeh-modal-total { margin-top: 18px; padding-top: 14px; border-top: 2px solid #333; display: flex; justify-content: space-between; align-items: baseline; }
.gabbeh-modal-total .label { font-size: 15px; font-weight: 500; }
.gabbeh-modal-total .price { font-size: 22px; font-weight: 700; }
.gabbeh-modal-notes { margin-top: 14px; font-size: 11px; color: #999; line-height: 1.8; }

/* === レスポンシブ === */
@media (max-width: 700px) {
  .gabbeh-form .gabbeh-item-body { flex-direction: column; }
  .gabbeh-form .size-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gabbeh-form .size-times { display: none; }
  .gabbeh-form .gabbeh-item { padding: 14px; }
  .gabbeh-form .size-field input[type="number"] { width: 100%; max-width: 120px; }
  .gabbeh-form .photo-mini-slot { width: 56px; height: 56px; }
  .gabbeh-form .photo-mini-slot .icon { font-size: 20px; }
  .gabbeh-sticky-inner { padding: 10px 16px; }
  .gabbeh-sticky-price { font-size: 20px; }
  .gabbeh-estimate-modal { padding: 20px 16px 28px; }
  .gabbeh-form .free-packing-banner { font-size: 13px; padding: 12px; }
}
