@charset "UTF-8";

/* Mailform Pro用のラベルスタイル - WordPress側のスタイルを強制上書き */
form#mailformpro label {
    border-radius: 0 !important;
    margin: 0 !important;
    display: block !important;
    font-size: inherit !important;
    width: auto !important;
    font-weight: inherit !important;
    white-space: normal !important;
    float: none !important;
    text-align: left !important;
}

/* Mailform Proの行レイアウトを強制上書き */
form#mailformpro .row.mailform {
    display: block !important;
}

form#mailformpro .col-sm-3,
form#mailformpro .col-sm-9,
form#mailformpro .col-12 {
    width: 100% !important;
    float: none !important;
    display: block !important;
}

/* 入力フィールドのサイズ統一 */
form#mailformpro input[type="text"],
form#mailformpro input[type="email"],
form#mailformpro input[type="tel"],
form#mailformpro select,
form#mailformpro textarea,
.mfp_element_text input,
.mfp_element_email input,
.mfp_element_tel input,
.mfp_element_select-one select,
.mfp_element_textarea textarea,
input.form-control,
select.form-control,
textarea.form-control {
    width: 100% !important;
    height: 40px !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* テキストエリアの高さ調整 */
form#mailformpro textarea,
.mfp_element_textarea textarea {
    height: 80px !important;
    resize: vertical !important;
}

/* セレクトボックスの高さ調整 */
form#mailformpro select,
.mfp_element_select-one select {
    height: 40px !important;
    padding: 8px 12px !important;
}

/* 送信ボタンのデザイン改善 */
.mfp_buttons button[type="submit"] {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

.mfp_buttons button[type="submit"]:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.mfp_buttons button[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3) !important;
}

/* Mailform Pro要素のボックスシャドウを強制削除 */
.mfp_element_text, 
.mfp_element_number, 
.mfp_element_select-one, 
.mfp_element_email, 
.mfp_element_tel, 
.mfp_element_textarea, 
.mfp_element_date, 
.mfp_element_password {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Glyphiconアイコンの代替スタイル */
.glyphicon {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.glyphicon-circle-arrow-right:before {
    content: "▶";
    margin-right: 8px;
    color: white;
}
body {
    font-family: "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
    line-height: 1.6;
    color: #333;
}

#estimate_form_wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #28a745 100%);
}

.cta-content {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #28a745;
}



.cta-description {
    font-size: 14px;
    margin: 0 0 15px 0;
    color: #6c757d;
    line-height: 1.4;
}

.cta-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cta-feature {
    font-size: 13px;
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
}

/* ラベルの改行防止を削除 - 小画面で折り返しを許可 */
form#mailformpro label,
.mfp_element_text label,
.mfp_element_email label,
.mfp_element_tel label,
.mfp_element_select-one label,
.mfp_element_textarea label {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* ラベルの幅制限を削除 - 小画面で全幅使用 */
form#mailformpro .form-group label {
    max-width: none !important;
    display: block !important;
    width: 100% !important;
}

/* フォームセクション */
.mfp_phase {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* .mfp_phase内の要素が飛び出さないように制限 */
.mfp_phase * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mfp_phase .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.mfp_phase .col-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mfp_phase .form-group {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mfp.query {
    background-color: #007bff;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.mfp.query .glyphicon {
    margin-right: 8px;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    margin-left: 0;
    text-align: left;
    line-height: 1.4;
}

/* 必須マークを含むラベルの配置調整 */
.mfp_phase p.mfp {
    margin-bottom: 8px;
    line-height: 1.4;
}

.mfp_phase p.mfp .must {
    vertical-align: baseline;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* アクセシビリティ改善 */
.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* フォーカス可能要素のタブインデックス */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* ラジオボタンとチェックボックスのアクセシビリティ */
input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 高コントラスト対応 */
@media (prefers-contrast: high) {
    .form-control {
        border: 2px solid #000;
    }
    
    .mfp.query {
        background-color: #000;
        color: #fff;
    }
    
    .must {
        background-color: #000;
        color: #fff;
    }
}

/* モーション軽減対応 */
@media (prefers-reduced-motion: reduce) {
    .mfp_buttons button[type="submit"] {
        transition: none !important;
    }
    
    .form-control {
        transition: none !important;
    }
}

.form-control[type="file"] {
    padding: 6px 12px;
}

/* セレクトボックス */
select.form-control {
    height: auto;
    padding: 10px 12px;
}

/* テキストエリア */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* 必須マーク */
.must {
    background-color: #dc3545;
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* チェックボックス */
input[type="checkbox"] {
    margin-right: 8px;
}

/* ラジオボタン */
.radio-group {
    margin-top: 8px;
}

.radio-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.radio-item input[type="radio"] {
    margin-right: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

.radio-item label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    flex: 1;
}

/* ボタンのテキストシャドウ削除 */
.mfp_element_submit,
.mfp_element_reset,
.mfp_element_button,
button.mfp_next,
button.mfp_prev {
    text-shadow: none !important;
}

/* ボタン */
.mfp_buttons {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.mfp_buttons button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.15s ease-in-out;
}

.mfp_buttons button[type="submit"] {
    background-color: #28a745;
    color: white;
    width: 100%;
}

.mfp_buttons button[type="submit"]:hover {
    background-color: #218838;
}

/* ヘルプテキスト */
.form-text {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

.form-text a {
    color: #007bff;
    text-decoration: none;
}

.form-text a:hover {
    text-decoration: underline;
}

/* 隠しフォーム */
.form-cat {
    display: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #estimate_form_wrapper {
        padding: 15px;
        max-width: 100%;
    }
    
    /* CTA レスポンシブ */
    .cta-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .cta-title {
        font-size: 18px;
        line-height: 1.3;
        color: #28a745;
    }
    
    .cta-description {
        font-size: 13px;
        margin-bottom: 12px;
        color: #6c757d;
    }
    
    .cta-features {
        gap: 10px;
    }
    
    .cta-feature {
        font-size: 12px;
        padding: 5px 10px;
        background-color: #28a745;
        color: white;
    }
    
    .mfp_phase {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mfp.query {
        padding: 10px 12px;
        font-size: 14px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .form-control {
        padding: 12px 10px;
        font-size: 16px; /* iOS ズーム防止 */
    }
    
    /* ラジオボタンのレスポンシブ改善 */
    .radio-item {
        margin-bottom: 15px;
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .radio-item input[type="radio"] {
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .radio-item label {
        font-size: 14px;
        line-height: 1.5;
        width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* テキストエリアのレスポンシブ改善 */
    textarea.form-control {
        min-height: 100px;
        font-size: 16px;
    }
    
    /* ボタンのタッチ対応 */
    .mfp_buttons button[type="submit"] {
        padding: 18px 30px;
        font-size: 18px;
        min-height: 50px;
    }
    
    /* フォームグループの調整 */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* mfp_ok スタイル */
div.mfp_ok {
    font-size: 10px !important;
}

@media (max-width: 480px) {
    #estimate_form_wrapper {
        padding: 10px;
    }
    
    /* CTA 小画面対応 */
    .cta-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .cta-title {
        font-size: 16px;
        line-height: 1.2;
        color: #28a745;
    }
    
    .cta-description {
        font-size: 12px;
        margin-bottom: 10px;
        color: #6c757d;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .cta-feature {
        font-size: 11px;
        padding: 4px 8px;
        width: fit-content;
        background-color: #28a745;
        color: white;
    }
    
    .mfp_phase {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .mfp.query {
        padding: 8px 10px;
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 4px;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
    
    .form-control {
        padding: 10px 8px;
        font-size: 16px;
    }
    
    /* ラジオボタンの小画面対応 */
    .radio-item {
        margin-bottom: 12px;
        padding: 6px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .radio-item input[type="radio"] {
        margin-bottom: 6px;
        margin-right: 0;
    }
    
    .radio-item label {
        font-size: 13px;
        line-height: 1.4;
        width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* テキストエリアの小画面対応 */
    textarea.form-control {
        min-height: 80px;
        font-size: 16px;
    }
    
    /* ボタンの小画面対応 */
    .mfp_buttons {
        padding: 15px 10px;
    }
    
    .mfp_buttons button[type="submit"] {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 45px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* 必須マークの小画面対応 */
    .must {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    /* ヘルプテキストの小画面対応 */
    .form-text {
        font-size: 12px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* 極小画面対応（320px以下） */
@media (max-width: 320px) {
    #estimate_form_wrapper {
        padding: 8px;
    }
    
    .mfp_phase {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .mfp.query {
        padding: 6px 8px;
        font-size: 12px;
        line-height: 1.3;
    }
    
    .form-group label {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .form-control {
        padding: 8px 6px;
        font-size: 16px;
    }
    
    .radio-item label {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .mfp_buttons button[type="submit"] {
        padding: 12px 15px;
        font-size: 15px;
        min-height: 40px;
    }
    
    .must {
        font-size: 8px;
        padding: 1px 2px;
    }
}