/**
 * お問い合わせページ専用スタイル
 */

/* ============================================
   お問い合わせページ全体
   ============================================ */
.contact-page-main {
    background-color: rgba(233, 210, 187, 0.4);
    padding: 96px 0;
    min-height: calc(100vh - 80px - 357px); /* ヘッダーとフッターの高さを引く */
    position: relative;
    top: -20px;
}

.contact-page-container {
    max-width: 1149px;
    margin: 0 auto;
    padding: 0 158.5px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
}

/* ============================================
   お問い合わせヘッダー
   ============================================ */
.contact-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.contact-title {
    font-family: Arial, sans-serif;
    font-size: 36px;
    line-height: 40px;
    color: #4a4a4a;
    margin: 0;
}

.contact-subtitle {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 28px;
    color: #4a4a4a;
    margin: 0;
}

/* ============================================
   お問い合わせフォーム
   ============================================ */
.contact-form-wrapper {
    width: 100%;
    max-width: 832px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form-wrapper .wpcf7 {
    width: 100%;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

span.wpcf7-form-control-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

span.wpcf7-form-control-wrap label {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #4a4a4a;
    display: flex;
    align-items: center;
    gap: 4px;
}

span.wpcf7-form-control-wrap .wpcf7-required,
span.wpcf7-form-control-wrap label .required {
    color: #e76f51;
    font-size: 16px;
    line-height: 24px;
}

.contact-form-wrapper .wpcf7-text,
.contact-form-wrapper .wpcf7-email,
.contact-form-wrapper .wpcf7-tel,
.contact-form-wrapper .wpcf7-select,
.contact-form-wrapper .wpcf7-textarea {
    width: 100%;
    padding: 12px 16px;
    height: 50px;
    background-color: rgba(233, 209, 186, 0.4) !important;
    border: 1px solid rgba(232, 211, 190, 0.4);
    border-radius: 10px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #4a4a4a;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-form-wrapper .wpcf7-text::placeholder,
.contact-form-wrapper .wpcf7-email::placeholder,
.contact-form-wrapper .wpcf7-tel::placeholder,
.contact-form-wrapper .wpcf7-textarea::placeholder {
    color: rgba(74, 74, 74, 0.6);
    opacity: 1;
}

.contact-form-wrapper .wpcf7-text:focus,
.contact-form-wrapper .wpcf7-email:focus,
.contact-form-wrapper .wpcf7-tel:focus,
.contact-form-wrapper .wpcf7-select:focus,
.contact-form-wrapper .wpcf7-textarea:focus {
    outline: none;
    border-color: #e76f51;
    background-color: rgba(233, 209, 186, 0.4) !important;
}

.contact-form-wrapper .wpcf7-select {
    appearance: none;
    background-image: url('../images/common/icon-chevron-down.svg');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
    cursor: pointer;
    background-color: rgba(233, 209, 186, 0.4) !important;
}

.contact-form-wrapper .wpcf7-textarea {
    min-height: 170px;
    height: 170px;
    resize: vertical;
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: rgba(233, 209, 186, 0.4) !important;
}

/* プレースホルダーのスタイル（WebKit/Blink系ブラウザ） */
.contact-form-wrapper .wpcf7-text::-webkit-input-placeholder,
.contact-form-wrapper .wpcf7-email::-webkit-input-placeholder,
.contact-form-wrapper .wpcf7-tel::-webkit-input-placeholder,
.contact-form-wrapper .wpcf7-textarea::-webkit-input-placeholder {
    color: rgba(74, 74, 74, 0.6);
}

/* プレースホルダーのスタイル（Firefox） */
.contact-form-wrapper .wpcf7-text::-moz-placeholder,
.contact-form-wrapper .wpcf7-email::-moz-placeholder,
.contact-form-wrapper .wpcf7-tel::-moz-placeholder,
.contact-form-wrapper .wpcf7-textarea::-moz-placeholder {
    color: rgba(74, 74, 74, 0.6);
    opacity: 1;
}

/* プレースホルダーのスタイル（IE/Edge） */
.contact-form-wrapper .wpcf7-text:-ms-input-placeholder,
.contact-form-wrapper .wpcf7-email:-ms-input-placeholder,
.contact-form-wrapper .wpcf7-tel:-ms-input-placeholder,
.contact-form-wrapper .wpcf7-textarea:-ms-input-placeholder {
    color: rgba(74, 74, 74, 0.6);
}

.form-privacy {
    background-color: #f8e9da;
    border-radius: 10px;
    padding: 16px 16px 16px 16px;
    margin-top: 0;
}

.form-privacy p {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #4a4a4a;
    margin: 0;
}

.form-submit-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

/* Contact Form 7の送信ボタンを中央揃え - 送信ボタンを含むpタグのみ */
.wpcf7-form p:has(input[type="submit"]),
.wpcf7-form p:has(.wpcf7-submit) {
    text-align: center;
}

/* :has() がサポートされていないブラウザ用のフォールバック */
.wpcf7-form > p:last-child {
    text-align: center;
}

/* 送信ボタンのスタイル - 複数のセレクタで確実に適用 */
.contact-form-wrapper .wpcf7-submit,
.contact-form-wrapper input[type="submit"].wpcf7-submit,
.contact-page-main .wpcf7-submit,
.contact-page-main input[type="submit"].wpcf7-submit,
[id*="03ebb27"] .wpcf7-submit,
[id*="03ebb27"] input[type="submit"],
.wpcf7[id*="03ebb27"] .wpcf7-submit,
.wpcf7[id*="03ebb27"] input[type="submit"],
[data-id*="03ebb27"] .wpcf7-submit,
[data-id*="03ebb27"] input[type="submit"],
.wpcf7-form input[type="submit"],
.contact-form-wrapper .wpcf7 input[type="submit"] {
    background-color: #e76f51 !important;
    color: #fff !important;
    padding: 0 32px !important;
    height: 56px !important;
    border-radius: 50px !important;
    border: none !important;
    font-family: Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 24px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 158.75px !important;
}

.contact-form-wrapper .wpcf7-submit:hover,
.contact-form-wrapper input[type="submit"].wpcf7-submit:hover,
.contact-page-main .wpcf7-submit:hover,
.contact-page-main input[type="submit"].wpcf7-submit:hover,
[id*="03ebb27"] .wpcf7-submit:hover,
[id*="03ebb27"] input[type="submit"]:hover,
.wpcf7[id*="03ebb27"] .wpcf7-submit:hover,
.wpcf7[id*="03ebb27"] input[type="submit"]:hover,
[data-id*="03ebb27"] .wpcf7-submit:hover,
[data-id*="03ebb27"] input[type="submit"]:hover,
.wpcf7-form input[type="submit"]:hover,
.contact-form-wrapper .wpcf7 input[type="submit"]:hover {
    background-color: #d65a40 !important;
    color: #fff !important;
}

.contact-form-wrapper .wpcf7-submit:focus,
.contact-form-wrapper input[type="submit"].wpcf7-submit:focus,
.contact-page-main .wpcf7-submit:focus,
.contact-page-main input[type="submit"].wpcf7-submit:focus,
[id*="03ebb27"] .wpcf7-submit:focus,
[id*="03ebb27"] input[type="submit"]:focus,
.wpcf7[id*="03ebb27"] .wpcf7-submit:focus,
.wpcf7[id*="03ebb27"] input[type="submit"]:focus,
[data-id*="03ebb27"] .wpcf7-submit:focus,
[data-id*="03ebb27"] input[type="submit"]:focus,
.wpcf7-form input[type="submit"]:focus,
.contact-form-wrapper .wpcf7 input[type="submit"]:focus {
    outline: none !important;
    background-color: #d65a40 !important;
    box-shadow: 0 0 0 3px rgba(231, 111, 81, 0.3) !important;
    color: #fff !important;
}

.contact-form-wrapper .wpcf7-submit:active,
.contact-form-wrapper input[type="submit"].wpcf7-submit:active,
.contact-page-main .wpcf7-submit:active,
.contact-page-main input[type="submit"].wpcf7-submit:active,
[id*="03ebb27"] .wpcf7-submit:active,
[id*="03ebb27"] input[type="submit"]:active,
.wpcf7[id*="03ebb27"] .wpcf7-submit:active,
.wpcf7[id*="03ebb27"] input[type="submit"]:active,
[data-id*="03ebb27"] .wpcf7-submit:active,
[data-id*="03ebb27"] input[type="submit"]:active,
.wpcf7-form input[type="submit"]:active,
.contact-form-wrapper .wpcf7 input[type="submit"]:active {
    background-color: #c54e35 !important;
    color: #fff !important;
}

/* CF7 レスポンスメッセージ */
.wpcf7-response-output {
    margin: 0;
    padding: 16px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wpcf7-validation-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wpcf7-spinner {
    margin-left: 8px;
}

/* CF7 エラーメッセージ */
.wpcf7-not-valid-tip {
    color: #e76f51;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    margin-top: 4px;
}

.wpcf7-not-valid {
    border-color: #e76f51 !important;
}

/* ============================================
   その他のお問い合わせ方法
   ============================================ */
.contact-other-methods {
    background-color: #f8e9da;
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 832px;
    margin: 0 auto;
}

.contact-other-methods-title {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 28px;
    color: #4a4a4a;
    margin: 0;
    font-weight: normal;
}

.contact-methods-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-left: 0;
}

.contact-method-content {
    margin-left: 36px;
}

.contact-method-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(74, 74, 74, 0.8);
}

.contact-method-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.contact-method-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 36px;
}

.contact-method-title {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #4a4a4a;
    margin: 0 0 4px 0;
}

.contact-method-text {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: rgba(74, 74, 74, 0.8);
    margin: 0;
}

.contact-method-subtext {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #8b8b8b;
    margin: 4px 0 0 0;
}

/* ============================================
   レスポンシブ対応
   ============================================ */
@media (max-width: 1024px) {
    .contact-page-main {
        padding: 64px 0;
    }
    
    .contact-page-container {
        padding: 0 24px;
    }
}

@media (max-width: 1200px) {
    .contact-page-container {
        padding: 0 80px;
    }
}

@media (max-width: 1000px) {
    .contact-page-container {
        padding: 0 32px;
    }
}

@media (max-width: 768px) {
    .contact-page-main {
        padding: 48px 0;
    }
    
    .contact-page-container {
        padding: 0 20px;
        gap: 32px;
    }
    
    .contact-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .contact-subtitle {
        font-size: 14px;
        line-height: 24px;
    }
    
    .wpcf7-form {
        gap: 8px;
    }
    
    .contact-other-methods {
        padding: 32px 24px;
    }
    
    .contact-other-methods-title {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 20px;
        line-height: 32px;
    }
    
    .wpcf7-form {
        gap: 8px;
    }
    
    /* 送信ボタンを中央に表示（カスタムフォーム） */
    .contact-form-wrapper .form-submit-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    /* 送信ボタンを中央に表示（Contact Form 7） */
    .contact-form-wrapper .wpcf7-form > p:last-child {
        text-align: center;
    }
    
    /* アイコンを文字の横に並べる（縦積みにしない） */
    .contact-method-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }
    
    .contact-method-content {
        margin-left: 0;
    }
    
    .contact-method-icon {
        margin-top: 0;
    }
}