@charset "utf-8";

/* ==========================================
   全般・共通スタイル
   ========================================== */
body {
    font-family: "Helvetica Neue", "Noto Sans JP", Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px 10px; /* スマホ用に左右に最低限の余白を確保 */
    color: #333;
}

.form-container { /* 一番外枠 */
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

h2 { /* ページタイトル */
    text-align: center;
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* ==========================================
   📄 フォーム上部 案内文・テキストリンク
   ========================================== */
.form-description-text {
    font-size: 13px;
    line-height: 1.6;
    color: #444444;
    margin-top: 10px;
    margin-bottom: 20px;
}

.form-description-link {
    color: #4285f4;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.form-description-link:hover {
    color: #1a73e8;
}

/* ==========================================
   レイアウト（設問行・入力欄）
   ========================================== */
.form-row { /* 各項目div */
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0; /* 線の太さ、種類、色 */
    padding-bottom: 20px; /* 線と文字の間の余白 */
}

.form-row:last-of-type { /* 最後の設問の下には線を引かない */
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-label { /* 各項目の設問ラベル */
    width: 180px;
    flex-shrink: 0;
    font-size: 0.9em;
    font-weight: bold;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.form-content { /* 入力欄div */
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.required-badge { /* 「必須」のやつ */
    background-color: #e74c3c;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 入力標準フィールド */
.form-content input[type="text"],
.form-content input[type="tel"],
.form-content input[type="email"],
.form-content select,
.form-content textarea,
.chair-text-other-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}

.input-zip {
    width: 150px !important;
    flex: none;
}

.btn-zip {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-zip:hover {
    background-color: #5a6268;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}
.radio-option input {
    margin-right: 6px;
}

.info-group {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    position: relative;
}

.info-group-title {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #fff;
    padding: 0 10px;
    font-weight: bold;
    color: #4285f4;
    font-size: 14px;
}

/* ==========================================
   コースご案内エリア（PC時2カラム・スマホ時縦並び）
   ========================================== */
.course-guide-container {
    width: 100%;
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-guide-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    border-bottom: 1px dashed #e8e8e8;
    padding-bottom: 15px;
    transition: opacity 0.2s ease;
}
.course-guide-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.course-guide-title {
    font-size: 13px;
    font-weight: bold;
    color: #333333;
    width: 130px;
    flex-shrink: 0;
    padding-top: 2px;
}

.course-guide-desc {
    flex-grow: 1;
}

.course-guide-text {
    font-size: 12px;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

.course-guide-note {
    font-size: 12px;
    color: #777777;
    display: inline-block;
    margin-top: 4px;
}

/* 📱 スマホ対応（コース案内エリア） */
@media (max-width: 650px) {
    .course-guide-item {
        flex-direction: column;
        gap: 6px;
    }
    .course-guide-title {
        width: 100%;
    }
    .course-guide-text {
        font-size: 13px;
    }
}

/* ==========================================
   📦 商品選択セクション（グリッド・カード）
   ========================================== */
.product-label { /* 商品を選ぶとこの設問ラベル */
    width: 100%;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

#product-section { /* 商品一覧 */
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
}

.category-selector-grid { /* カテゴリ一覧 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 15px;
}

.category-card { /* カテゴリカード単体 */
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card .img-wrapper { /* カテゴリ画像表示エリア */
    width: 100%;
    aspect-ratio: 6 / 1;
    background: #f5f5f5;
}

.category-card .img-wrapper img { /* カテゴリ画像 */
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.category-card.selected { /* カテゴリが選択されたときの青枠 */
    border-color: #4285f4;
    background-color: #f1f5fe;
    box-shadow: 0 0 6px rgba(66, 133, 244, 0.2);
}

.image-selector-grid { /* 商品一覧 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.image-card { /* 画像カード単体のスタイル */
    position: relative;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
}

.image-card input[type="checkbox"] { /* 本物のチェックボックスは画面から隠す */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-content { /* カードの中身 */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.img-wrapper { /* 商品カード内の画像表示エリア */
    width: 100%;
    aspect-ratio: 5 / 4; 
    background: #f0f0f0;
}

.img-wrapper img { /* 商品カード画像 */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info { /* 商品カードの文字エリア */
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name { /* 商品名 */
    font-size: 12px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.image-card.selected { /* 選択されたとき */
    border-color: #4285f4;
    background-color: #f1f5fe;
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.3);
}

.image-card.disabled { /* ロックがかかったとき */
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   🛒 選択中商品のサマリーボックス
   ========================================== */
.selected-summary-box {
    width: 100%;
    margin: 25px 0;
    padding: 20px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}

.summary-title {
    font-size: 14px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 12px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 6px;
}

.selected-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-summary-list .summary-item span {
    font-size: 13px !important;
}

.empty-msg {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 10px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-remove {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-remove:hover {
    background-color: #dc2626;
}

/* ==========================================
   🪑 イスの情報 入力フォーム・UIカード
   ========================================== */
input[class^="chair-input-"][type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 14px;
    color: #334155;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

input[class^="chair-input-"][type="radio"] {
    width: auto !important;
    margin: 0 6px 0 0; /* ラジオボタンと文字の間に隙間を作る */
    flex-shrink: 0;
}

[class^="chair-input-"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.chair-input-req {
    border-left: 3px solid #ef4444;
}

.chair-ui-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.chair-section-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* テキスト・選択カードのコンテナベース */
.chair-text-row-top,
.chair-text-row-bottom {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* ラジオボタンカードの共通デザイン */
.chair-text-card,
.chair-img-text-card {
    height: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px 0 12px;
    box-sizing: border-box;
    gap: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chair-text-card:hover,
.chair-img-text-card:hover {
    background-color: #f8f9fa;
    border-color: #999999;
}

.chair-text-card span,
.chair-img-text-card span {
    font-weight: bold;
    color: #333333;
    font-size: 11px;
    white-space: nowrap;
}

/* 「イスの形（全体）」の3列並び（親要素に依存しない明示的な指定） */
.chair-text-row-top .chair-text-card {
    flex: 0 0 calc((100% - 16px) / 3);
}

/* 「その他」カード単体の横幅 */
.chair-text-row-bottom .card-other-text {
    flex: 0 0 calc((100% - 16px) / 3);
}

/* 底面専用カード（画像の並び） */
.chair-img-text-card {
    flex: 1;
    min-width: 0; /* flexアイテムの縮小バグ防止 */
    padding: 0 4px 0 8px;
}

.chair-img-text-card img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.chair-text-other-container {
    display: none;
    flex: 1;
    min-width: 0;
}

.chair-text-other-container input {
    width: 100%;
    height: 40px;
    padding: 6px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* イスの形 3連・参考図テーブル */
.chair-ref-table {
    display: flex;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px; /* 下部テキストカードとの距離を微調整 */
}

.chair-ref-cell {
    flex: 1;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 8px 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chair-ref-cell img {
    display: block;
    width: 100%;
    max-width: 60px;
    height: auto;
    object-fit: contain;
}

.chair-ref-label {
    font-size: 10px;
    font-weight: bold;
    color: #666666;
    margin-top: 6px;
    white-space: nowrap;
}

/* ==========================================
   システム制御・共通ボタン
   ========================================== */
.is-hidden {
    display: none !important;
}

.hp-field {
    display: none !important;
    visibility: hidden !important;
}

.submit-btn {
    display: block;
    width: 240px;
    margin: 40px auto 0;
    background: #4285f4;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.submit-btn:hover {
    background: #357ae8;
}

/* ==========================================
   📱 汎用スマホ対応（ブレイクポイント: 600px）
   ========================================== */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-label {
        margin-bottom: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    .form-content {
        width: 100%;
    }
    
    /* ⚠️ スマホ表示時はテキストカードを2~3列から縦並び（1列）に落とす、もしくは適正幅に保つ場合 */
    .chair-text-row-top,
    .chair-text-row-bottom {
        flex-wrap: wrap; /* スマホでは折り返しを許可 */
    }
    .chair-text-row-top .chair-text-card,
    .chair-text-row-bottom .card-other-text {
        flex: 1 1 calc((100% - 8px) / 2); /* 2列並びにするか、100%で1列にするか調整可能 */
    }
}