/* ページ全体の中央寄せ */
body .entry-content,
body .post-content,
body .page-content {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* フォーム全体のレイアウト */
.wpcf7-form,
h2, h3,
dl.reel-input,
dl.mitsumori,
dl.hacchu {
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* セクション見出し */
h2, h3 {
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* リール入力行のスタイル */
div.reel-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    flex-wrap: wrap;
    font-size: 14px;
}

div.reel-input-row:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Contact Form 7フォーム要素の基本スタイル */
.wpcf7-form-control-wrap {
    display: inline-block;
    margin: 0;
}

/* セレクトボックス */
select.wpcf7-form-control.wpcf7-select {
    min-width: 100px;
    max-width: 130px;
    width: auto;
    padding: 6px 25px 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: 
        linear-gradient(45deg, transparent 50%, #666 50%),
        linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: 
        calc(100% - 12px) calc(1em + 2px),
        calc(100% - 8px) calc(1em + 2px);
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

/* ナンバー入力フィールド */
input.wpcf7-form-control.wpcf7-number {
    min-width: 60px;
    max-width: 80px;
    width: auto;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    text-align: center;
}

/* フォーカス時のスタイル */
select.wpcf7-form-control:focus,
input.wpcf7-form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.3);
}

/* アコーディオンスタイル */
dl.accordion-list {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

dt.accordion-list_btn {
    background: #f8f8f8;
    padding: 12px 15px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 500;
    color: #333;
    position: relative;
    transition: background-color 0.3s ease;
    margin: 0;
    display: block;
}

dt.accordion-list_btn:hover {
    background: #e8e8e8;
}

dt.accordion-list_btn::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: transform 0.3s ease;
}

dt.accordion-list_btn.active::after {
    transform: translateY(-50%) rotate(45deg);
}

dd.accordion-list_cont {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

dd.accordion-list_cont.active {
    padding: 15px;
    max-height: 1000px;
}

/* dl要素の統一スタイル */
dl.mitsumori,
dl.hacchu,
dl.reel-input {
    margin: 20px 0;
    border: none;
    background: transparent;
}

/* dt, dd要素の統一スタイル */
dt,
dt.contact-form__input__text {
    font-weight: 600;
    color: #333;
    padding: 0;
    background: none;
    border: none;
    font-size: 1em;
}

dd,
dd.contact-form__input {
    margin: 0 0 15px 0;
    padding: 0;
    background: none;
}

dd.m20-b { margin-bottom: 20px; }
dd.m10-b { margin-bottom: 10px; }
dd.p0-l { padding-left: 0; }

/* フォーム要素の共通スタイル */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

/* テキストエリア専用スタイル */
textarea {
    max-width: 600px;
    min-width: 600px;
}

/* 送信ボタン */
input[type="submit"] {
    background: #4CAF50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    min-width: 150px;
    width: auto;
}

input[type="submit"]:hover {
    background: #45a049;
}

input[type="submit"]:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* チェックボックス・ラジオボタン */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.1);
}

.wpcf7-list-item {
    margin: 12px 15px 12px 0;
    display: inline-block;
    padding: 5px;
}

.wpcf7-list-item label {
    margin: 0;
    font-weight: normal;
    padding: 3px 0;
    display: inline-block;
}

/* ラジオボタンの追加調整 */
dd.contact-form__input .wpcf7-list-item {
    margin: 8px 20px 8px 0;
}

.wpcf7-radio .wpcf7-list-item {
    margin: 15px 25px 15px 0;
}

/* output要素 */
output {
    font-weight: 600;
    color: #333;
}

/* メッセージスタイル */
.wpcf7-not-valid-tip {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.wpcf7-validation-errors {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #d32f2f;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.wpcf7-mail-sent-ok {
    background: #e8f5e8;
    border: 1px solid #4CAF50;
    color: #2e7d32;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* キャンペーン情報 */
.red { color: #d32f2f; }
.small { font-size: 0.9em; }

/* 概算セクション用 */
dl.dl_style01 {
    display: flex;
    flex-wrap: wrap;
    width: auto;
}

dl.dl_style01 dt {
    width: 30%;
}

dl.dl_style01 dd {
    width: 70%;
}

/* レスポンシブデザイン - 統合版 */
@media (max-width: 768px) {
    /* モバイル用のページマージン設定 */
    body {
        padding: 0 15px !important;
    }
    
    body .entry-content,
    body .post-content,
    body .page-content {
        padding: 0 !important;
        max-width: none !important;
    }
    
    .wpcf7-form {
        padding: 0 !important;
    }
    
    /* リール入力行のモバイル調整 - 横並び維持 */
    div.reel-input-row {
        flex-direction: row !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 8px 10px !important;
        font-size: 1em !important;
    }

    /* モバイルでのセレクトボックス幅調整 */
    select.wpcf7-form-control.wpcf7-select {
        min-width: 80px !important;
        max-width: 100px !important;
        width: auto !important;
        font-size: 1.2em !important;
        padding: 5px 20px 5px 6px !important;
    }

    /* モバイルでのナンバー入力フィールド - 最小サイズ */
    input.wpcf7-form-control.wpcf7-number {
        min-width: 50px !important;
        max-width: 600px !important;
        width: 50px !important;
        padding: 5px !important;
        font-size: 1.2em !important;
        text-align: center !important;
    }

    h2, h3 {
        font-size: 1.2em;
    }
    
    textarea {
        max-width: 100%;
        min-width: 300px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0 12px !important;
    }
    
    div.reel-input-row {
        padding: 10px;
    }

    dt.accordion-list_btn {
        padding: 10px 12px;
    }

    dd.accordion-list_cont.active {
        padding: 12px;
    }
}

.wpcf7-form.submitting::after {
    content: "処理中...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 9999;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 送信ボタンを無効化表示 */
.wpcf7-form.submitting .wpcf7-submit {
    opacity: 0.6;
    cursor: not-allowed;
}