/* =========================================================
   全体レイアウト
========================================================= */
body {
    font-family: "Zen Kaku Gothic New", sans-serif;
    background: #FFFFFF;
    margin: 0;
    font-weight: 700;
}

.contact-container {
    width: 100%;
    padding: 150px 180px 200px;
    box-sizing: border-box;
}


/* =========================================================
   タイトル・説明文
========================================================= */
.contact-title {
    font-size: 32px;
    font-weight: 500;
    position: relative;
    padding-bottom: 12px;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.contact-title-img {
    width: 220px;
    height: auto;
    object-fit: contain;
}


.contact-title-desc {
    color: #222222;
    line-height: 1.9;
    font-size: 16px;
    margin-top: 18px;
}

.contact-title-border {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 18px;
    margin-bottom: 56px;
    background-image: repeating-linear-gradient(
        to right,
        #000 0,
        #000 1px,
        transparent 1px,
        transparent 8px
    );
}

.contact-desc {
    color: #222222;
    line-height: 1.9;
    font-size: 16px;
    margin-bottom: 80px;
}


/* =========================================================
   テーブル（お問い合わせ情報・お客様情報）
========================================================= */
.contact-info-table,
.customer-info-table {
    width: 100%;
    border-collapse: collapse;
}

/* 項目名（th） */
.contact-info-table th,
.customer-info-table th {
    width: 22%;
    background: #EDEDED;
    padding: 18px 25px 18px 20px;
    font-size: 16px;
    font-weight: 600;
    vertical-align: middle;
    text-align: left;
    border-top: 1px solid #FFFFFF;
    border-bottom: 1px solid #FFFFFF;
    border-left: none !important;
    border-right: none !important;
    position: relative;
}

/* 入力欄（td） */
.contact-info-table td,
.customer-info-table td {
    background: #FFFFFF;
    font-size: 16px;
    padding: 18px 0 18px 25px;
    border-top: 1px solid #B4B3B3;
    border-bottom: 1px solid #B4B3B3;
    border-left: none !important;
    border-right: none !important;
}

/* 必須バッジ */
.required {
    font-family: "DNP 秀英角ゴシック銀 Std", sans-serif;
    font-weight: 400;
    background: #FF0000;
    color: #FFFFFF;
    padding: 2px 7px;
    font-size: 13px;
}

.contact-info-table th .required,
.customer-info-table th .required {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}


/* =========================================================
   入力フォーム部品
========================================================= */

/* placeholderの薄さ */
::placeholder {
    opacity: 0.27;
}

/* テキストエリア（お問い合わせ内容） */
.inquiry-textarea {
    width: 100%;
    height: 92px;
    padding: 14px;
    font-size: 16px;
    background: #F6F6F6;
    box-sizing: border-box;
    resize: vertical;
}

/* お客様情報フォーム */
.customer-info-table .form-text,
.customer-info-table .form-textarea {
    width: 100%;
    height: 72px;
    max-width: none;
    background: #F6F6F6;
    padding: 12px;
    font-size: 16px;
    box-sizing: border-box;
}

.customer-info-table .form-select{
    width: 100%;
    height: 72px;
    max-width: none;
    background: #F6F6F6;
    padding: 12px;
    font-size: 16px;
    box-sizing: border-box;
}

/* ラジオボタン */
.radio-item {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    margin-right: 20px;
}

/* ラジオボタン強制表示（チェックボックスの影響を上書き） */
input[type="radio"] {
    appearance: radio !important;
    -webkit-appearance: radio !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0;
}

/* ラベルと入力欄の横並び（住所など） */
.flex-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}

.sub-label {
    width: 120px;
    font-size: 16px;
}

.sub-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.short {
    width: 160px;
}

/* 初期状態（未選択）の表示を薄くする */
.form-select:invalid {
    color: rgba(0, 0, 0, 0.27);
}

/* 選択した後は通常色 */
.form-select option {
    color: #000;
}


/* =========================================================
   お問い合わせ種別（Q1）
========================================================= */
.type-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.type-item input[type="checkbox"] {
    transform: scale(1.1);
}

.label-text {
    font-size: 16px;
    font-weight: 500;
}


/* =========================================================
   注意書き
========================================================= */
.notes-box {
    width: 50%;
    background: #FFFFFF;
    border: 1px solid #CECECE;
    padding: 15px;
    margin: 80px auto 30px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.8;
}


/* =========================================================
   見出しと表の間隔
========================================================= */
.section-title {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

.section-title:first-of-type {
    margin-bottom: 19px; /* お問い合わせ情報 → 表まで19px */
}

.section-title:nth-of-type(2) {
    margin-top: 72px;  /* お客様情報 → 表まで72px */
    margin-bottom: 19px;
}


/* =========================================================
   アンケートエリア
========================================================= */
.survey-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 60px;
    margin-bottom: 19px;
}

/* 設問だけグレー枠 */
.survey-box {
    background: #EDEDED;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

/* Q2の上下余白 */
.q2-box {
    margin-top: 40px;
}

/* 質問文 */
.survey-question {
    font-size: 16px;
    margin: 0;
}

/* Q1選択肢 */
.survey-options {
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-top: 0;
}

.survey-options label {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.survey-options input[type="checkbox"] {
    transform: scale(1.1);
}

/* Q2入力欄 */
.survey-input {
    width: 100%;
    height: 120px;
    padding: 14px;
    background: #F6F6F6;
    font-size: 16px;
    border: none;
    box-sizing: border-box;
    resize: vertical;
}


/* =========================================================
   個人情報の同意チェック
========================================================= */
.agree-wrap {
    margin-top: 30px;
    margin-bottom: 63px;
    text-align: center;
}

.agree-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.required-agree {
    font-family: "DNP 秀英角ゴシック銀 Std", sans-serif;
    font-weight: 400;    
    background: #FF0000;
    color: #FFFFFF;
    font-size: 13px;
    padding: 2px 7px;
    display: inline-block;
        writing-mode: horizontal-tb !important; /* 横書きを強制 */
    display: inline-block !important;
    white-space: nowrap !important; /* 改行させない */
}

.agree-text {
    color: #FF0000;
    font-weight: 700;
    font-size: 16px;
}


/* =========================================================
   送信ボタン
========================================================= */
.submit-wrap {
    text-align: center;
}

.submit-btn {
    background: #FF0000;
    color: #FFFFFF;
    font-size: 16px;
    padding: 16px 0;
    width: 260px;
    border: none;
    cursor: pointer;
}

.submit-btn:hover {
    opacity: 0.85;
}

/* 他のCSSの影響でチェックボックスが消える場合の復元 */
input[type="checkbox"] {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    position: relative !important;
    visibility: visible !important;
}

/* 問い合わせフォーム用のチェックボックスを必ず表示 */
.contact-container input[type="checkbox"] {
    display: inline-block !important;
    opacity: 1 !important;
    position: relative !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* チェックボックス強制表示（最優先） */
.type-item input[type="checkbox"],
.contact-container input[type="checkbox"],
.survey-options input[type="checkbox"] {
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    display: inline-block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0;
}

/* =========================================================
   タブレット（520px〜959px）
========================================================= */
@media screen and (min-width: 520px) and (max-width: 959px) {

    .contact-container {
        padding: 80px 40px 120px;
    }

    /* タイトルサイズ調整 */
    .contact-title {
        font-size: 26px;
    }

    .contact-desc {
        font-size: 15px;
    }

    /* テーブル */
    .contact-info-table th,
    .customer-info-table th {
        width: 30%;
        padding: 16px 18px;
        font-size: 15px;
    }

    .contact-info-table td,
    .customer-info-table td {
        padding: 16px 12px;
        font-size: 15px;
    }

    /* 入力部品を少し低く */
    .customer-info-table .form-text,
    .customer-info-table .form-select,
    .customer-info-table .form-textarea,
    .inquiry-textarea {
        height: 60px;
        font-size: 15px;
        padding: 10px;
    }

    .inquiry-textarea {
        height: 120px;
    }

    /* 住所など複数行の横並びを折り返しやすく */
    .flex-row,
    .sub-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .sub-label {
        width: 100%;
        margin-bottom: -6px;
    }

    .short {
        width: 200px;
    }

    /* チェックボックス・ラジオ */
    .radio-item,
    .type-item {
        margin-top: 12px;
    }

    /* アンケート枠 */
    .survey-box {
        height: auto;
        padding: 14px 20px;
    }

    .survey-title {
        margin-top: 45px;
    }

    .survey-input {
        height: 100px;
    }

    /* 同意文言 */
    .agree-label {
        font-size: 15px;
    }

    /* ボタンサイズ調整 */
    .submit-btn {
        width: 70%;
        max-width: 300px;
        font-size: 15px;
        padding: 14px 0;
    }
}

/* =========================================================
   スマホ（519px以下）
========================================================= */
@media screen and (max-width: 519px) {

    /* レイアウト調整 */
    .contact-container {
        padding: 60px 20px 80px;
    }

    .contact-title {
        font-size: 16px;
    }

    .contact-desc {
        font-size: 16px;
    }
    
    .contact-title-desc {
        font-size: 16px;
    }

    .submit-btn {
        width: 100%;
        font-size: 16px;
    }

    .contact-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-title-img {
        width: 70%;
        max-width: 220px;
        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
    }

    
    /* =====================================================
       テーブルを縦型に変更
    ===================================================== */
    .contact-info-table,
    .customer-info-table {
        display: block;
    }

    .contact-info-table tbody,
    .customer-info-table tbody {
        display: block;
    }

    .contact-info-table tr,
    .customer-info-table tr {
        display: block;
        margin-bottom: 24px;
        border: none;
    }

    /* 項目名（th） → 上段 */
    .contact-info-table th,
    .customer-info-table th {
        display: block;
        width: 100%;
        background: #EDEDED;
        padding: 14px 12px;
        font-size: 15px;
        border: none;
        border-bottom: 1px solid #D0D0D0;
        position: relative;
    }

    /* 必須マーク位置 */
    .contact-info-table th .required,
    .customer-info-table th .required {
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* 入力欄（td） → 下段 */
    .contact-info-table td,
    .customer-info-table td {
        display: block;
        width: 100%;
        padding: 14px 0;
        background: #FFFFFF;
        border: none;
        border-bottom: 1px solid #DCDCDC;
    }


    /* =====================================================
       入力フォームの幅調整
    ===================================================== */
    .customer-info-table .form-text,
    .customer-info-table .form-select,
    .customer-info-table .form-textarea,
    .inquiry-textarea {
        width: 100%;
        height: 56px;
        font-size: 15px;
        padding: 10px;
    }

    .inquiry-textarea {
        width: 100%;
        height: 100px;
    }


    /* =====================================================
       住所の横並び → 縦並び
    ===================================================== */
    .flex-row,
    .sub-row {
        display: block;
        gap: 0;
    }

    .sub-label {
        margin-bottom: 6px;
        width: auto;
    }

    .short {
        width: 100%;
    }

    /* タイトルを拡大 */
    .contact-title {
        font-size: 32px !important;
    }

    /* 入力欄のボーダー削除 */
    .contact-info-table td,
    .customer-info-table td {
        border-bottom: none !important;
    }

    /* テキスト入力欄の下線を消す */
    .customer-info-table .form-text,
    .customer-info-table .form-select,
    .customer-info-table .form-textarea,
    .inquiry-textarea {
        border: none !important;       /* 外枠も消す */
        border-bottom: none !important;
        background: #F6F6F6;
    }

    /* .required-agree を横書きにする */
    .required-agree {
        writing-mode: horizontal-tb !important; /* 横書き強制 */
        display: inline-block;
    }

    /* notes-box の幅を100%に */
    .notes-box {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }
}
