/* ============================================
   お問い合わせフォーム スタイル
   ============================================ */

/* セクション */
#contact {
    background-color: #fef7e5;
}

#contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* フォームコンテナ */
.cf-container {
    margin: 0 auto;
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* フォームグループ */
.cf-group {
    margin-bottom: 2rem;
}

.cf-group:last-of-type {
    margin-bottom: 0;
}

/* 入力欄ラッパー（PC横並び用） */
.cf-field {
    flex: 1;
    min-width: 0;
}

/* ラベル */
.cf-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1.5rem;
    font-weight: 500;
    color: #004097;
    margin-bottom: 0.6rem;
}

.cf-label .cf-required {
    display: inline-block;
    background-color: #e95513;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.1rem 0.6rem;
    border-radius: 0.3rem;
    margin-left: 0.6rem;
    flex-shrink: 0;
}

/* 入力フィールド共通 */
.cf-input,
.cf-select {
    width: 100%;
    padding: 1.2rem 1.4rem;
    font-size: 1.5rem;
    font-family: 'Noto Sans JP', sans-serif;
    border: 2px solid #ccc;
    border-radius: 0.8rem;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.cf-input:focus,
.cf-select:focus {
    outline: none;
    border-color: #FFF;
    box-shadow: 0 0 0 3px rgba(26, 170, 159, 0.15);
}

.cf-input::placeholder {
    color: #aaa;
}

.cf-textarea {
    resize: vertical;
    min-height: 15rem;
    line-height: 1.7;
}

/* セレクトボックス矢印 */
.cf-select-wrap {
    position: relative;
}

.cf-select-wrap::after {
    content: '';
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #004097;
    pointer-events: none;
}

.cf-select {
    padding-right: 3.5rem;
}

/* エラー表示 */
.cf-input.cf-error,
.cf-select.cf-error {
    border-color: #e53e3e;
}

.cf-error-msg {
    display: none;
    font-size: 1.3rem;
    color: #e53e3e;
    margin-top: 0.4rem;
    font-weight: 500;
}

.cf-error-msg.show {
    display: block;
    text-align: left;
}

.cf-general-error {
    background-color: #fff5f5;
    border: 1px solid #e53e3e;
    color: #e53e3e;
    padding: 1.2rem 1.5rem;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
    display: none;
}

.cf-general-error.show {
    display: block;
}

/* チェックボックス */
.cf-checkbox-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.cf-checkbox-wrap input[type="checkbox"] {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid #aaa;
    border-radius: 0.3rem;
    background-color: #fff;
    position: relative;
}

.cf-checkbox-wrap input[type="checkbox"]:checked {
    background-color: #FFF;
    border-color: #CCC;
}

.cf-checkbox-wrap input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 0.2rem;
    width: 0.5rem;
    height: 1rem;
    border: solid #004093;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cf-checkbox-wrap label {
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.cf-checkbox-wrap label a,
.cf-link {
    color: #004093;
    text-decoration: underline;
}

.cf-privacy-error {
    text-align: center;
}

/* reCAPTCHA注意書き */
.cf-recaptcha-notice {
    display: none;
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    margin-top: 1rem;
    line-height: 1.8;
}

.cf-recaptcha-notice.show {
    display: block;
}

/* ボタン共通 */
.cf-btn {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Noto Sans JP', sans-serif;
    color: #fff;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cf-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.cf-btn:active {
    transform: translateY(1px);
}

.cf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cf-btn-submit {
    background-color: #f08300;
}

.cf-btn-confirm {
    background-color: #f08300;
}

.cf-btn-back {
    background-color: #999;
    margin-top: 1.2rem;
}

/* ボタングループ（確認画面） */
.cf-btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 0;
    max-width: 480px;
}

/* 確認画面 */
#cf-step-confirm .cf-container {
    padding: 3rem 1.5rem;
}
.confirm_caption {
    text-align: center;
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 0;
}   
.cf-confirm-table {
    width: 100%;
    border-collapse: collapse;
}

.cf-confirm-table tr {
    border-bottom: 1px solid #e2e2e2;
}

.cf-confirm-table tr:last-child {
    border-bottom: none;
}

.cf-confirm-table th,
.cf-confirm-table td {
    display: block;
    width: 100%;
    padding: 1.5rem 1rem 0;
    font-size: 1.5rem;
    text-align: left;
}

.cf-confirm-table th {
    color: #004097;
    font-weight: 500;
    padding-bottom: 0.5rem;
}

.cf-confirm-table td {
    color: #333;
    word-break: break-all;
    padding-top: 0;
    padding-bottom: 1.5rem;
}

/* 完了画面 */
.cf-complete {
    text-align: center;
    padding: 3rem 1rem;
}

.cf-complete-icon {
    width: 80px;
    height: 80px;
    background-color: #004093;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.cf-complete-icon::after {
    content: '';
    width: 24px;
    height: 40px;
    border: solid #fff;
    border-width: 0 5px 5px 0;
    transform: rotate(45deg);
    margin-top: -6px;
}

.cf-complete h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #004097;
    margin-bottom: 1.5rem;
}

.cf-complete p {
    font-size: 1.5rem;
    color: #555;
    line-height: 1.8;
    text-align: center;
}

/* 画面切り替えアニメーション */
.cf-step {
    display: none;
}

.cf-step.active {
    display: block;
    animation: cfFadeIn 0.4s ease;
}

@keyframes cfFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ローディング */
.cf-loading {
    position: relative;
    pointer-events: none;
}

.cf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cfSpin 0.6s linear infinite;
}

@keyframes cfSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   レスポンシブ
   ============================================ */

/* タブレット以上 */
@media screen and (min-width: 480px) {
    .cf-container {
        padding: 3.5rem 4rem;
    }

    .confirm_caption {
        margin-bottom: 2rem;
    }   

    .cf-confirm-table th,
    .cf-confirm-table td {
        display: table-cell;
        padding: 3rem 1rem;
        vertical-align: top;
    }

    .cf-confirm-table th {
        width: 32%;
        white-space: nowrap;
    }

    .cf-btn-group {
        flex-direction: row-reverse;
        justify-content: center;
        gap: 1.5rem;
        margin: 50px auto 0;
    }

    .cf-btn-group .cf-btn {
        width: auto;
        min-width: 200px;
        margin-top: 2rem;
    }
}

/* デスクトップ */
@media screen and (min-width: 840px) {
    .cf-container {
        max-width: 860px;
    }

    .cf-group {
        display: flex;
        align-items: flex-start;
        gap: 2rem;
    }

    .cf-label {
        width: 260px;
        flex-shrink: 0;
        font-size: 1.6rem;
        margin-bottom: 0;
        padding-top: 1.2rem;
    }

    .cf-label .cf-required {
        margin-left: auto;
    }

    .cf-input,
    .cf-select {
        font-size: 1.6rem;
    }

    .cf-confirm-table th {
        width: 260px;
    }

    .cf-checkbox-wrap {
        justify-content: flex-start;
        padding-left: 280px;
    }

    .cf-privacy-error {
        text-align: left;
        padding-left: 280px;
    }
}
