/* スムーズスクロール設定 */
html {
    scroll-behavior: smooth;
}

/* 完了ページのアンカーリンク調整用 */
#contact-form-completion {
    scroll-margin-top: 100px; /* アンカーリンクでスクロールした時の上部余白 */
}

/* Contact Form Section */
.contact-form-section {
    margin-bottom: 40px;
}

.contact-form-wrapper {
    border-radius: 0;
}
.contact-form-wrapper .label-optional {
    font-size: 13px;
    color: #fff;
    background: #666666;
    padding: 2px 12px;
    margin-right: 10px;
    font-weight: 400;
}
.contact-form-wrapper .requied {
    font-size: 13px;
    color: #fff;
    background: #9A2F2F;
    padding: 2px 12px;
    margin-right: 10px;
    font-weight: 400;
}

/* Contact Form 7 Custom Styles */
.contact-form-wrapper .hidden-fields-container {
    display: none;
}
.contact-form-wrapper .wpcf7-form input::placeholder,
.contact-form-wrapper .wpcf7-form textarea::placeholder {
    color: #B7AEAE;
}
.contact-form-wrapper .wpcf7-form {
    margin: 0;
}

.contact-form-wrapper .wpcf7-form p {
    margin-bottom: 20px;
}

.contact-form-wrapper .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 5px;
}

.contact-form-wrapper label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #171717;
}

.contact-form-wrapper .wpcf7-date,
.contact-form-wrapper .wpcf7-text,
.contact-form-wrapper .wpcf7-email,
.contact-form-wrapper .wpcf7-tel,
.contact-form-wrapper .wpcf7-textarea,
.contact-form-wrapper .wpcf7-select {
    width: 100%;
    padding: 20px 15px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.4;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-form-wrapper .wpcf7-date {
    cursor: pointer;
}

.contact-form-wrapper .wpcf7-date:focus,
.contact-form-wrapper .wpcf7-text:focus,
.contact-form-wrapper .wpcf7-email:focus,
.contact-form-wrapper .wpcf7-tel:focus,
.contact-form-wrapper .wpcf7-textarea:focus,
.contact-form-wrapper .wpcf7-select:focus {
    outline: none;
    border-color: #666;
}

.contact-form-wrapper .wpcf7-radio label {
    display: flex;
    align-items: center;
}

.contact-form-wrapper .wpcf7-list-item input[type="radio"] {
    margin-top:0;
}

.contact-form-wrapper .wpcf7-textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form-wrapper .wpcf7-checkbox,
.contact-form-wrapper .wpcf7-radio {
    margin-bottom: 0px;
}

.contact-form-wrapper .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.contact-form-wrapper .wpcf7-list-item input[type="checkbox"],
.contact-form-wrapper .wpcf7-list-item input[type="radio"] {
    margin: 0;
    margin-top: 2px;
    margin-right: 5px;
}

.contact-form-wrapper .wpcf7-list-item-label {
    font-size: 13px;
    line-height: 1.5;
    color: #171717;
    cursor: pointer;
}

.contact-form-wrapper .privacy-details {
    overflow:auto;
    height: 150px;
    background: #fff;
    padding: 10px;
    margin-bottom: 20px;
    font-weight: 400;
}
.contact-form-wrapper .wpcf7-form [data-name="acceptance-privacy"] .wpcf7-list-item {
    margin: 0;
}
.contact-form-wrapper .wpcf7-form [data-name="acceptance-privacy"] .wpcf7-list-item-label {
    font-size: 14px;
    font-weight: 500;
    padding-left: 20px;
}

.contact-form-wrapper .btn-confirm {
    background-color: #171717;
    color: #fff;
    padding: 25px 30px;
    width: 100%;
    border: none;
    border-radius: 0;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    display: block;
    max-width: 250px;
    margin: 0 auto;
}

.contact-form-wrapper .btn-confirm.disabled {
    opacity: 0.5;
}


.contact-form-wrapper .wpcf7-submit:hover {
    opacity: 0.7;;
}

.contact-form-wrapper .wpcf7-submit:active {
    background-color: #171717;
}

.contact-form-wrapper .wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.contact-form-wrapper .wpcf7-response-output {
    margin-bottom: 30px;
    padding: 20px 0;
    font-size: 14px;
    line-height: 1.6;
    scroll-margin-top: 100px;
}

.contact-form-wrapper .wpcf7-mail-sent-ok {
    display: none !important;
}

.contact-form-wrapper .wpcf7-validation-errors,
.contact-form-wrapper .wpcf7-mail-sent-ng {
    color: #e74c3c;

}

.contact-form-wrapper .wpcf7-validation-errors p {
    margin-bottom: 10px;
    font-weight: 500;
}

.contact-form-wrapper .wpcf7-validation-errors ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 20px;
}

.contact-form-wrapper .wpcf7-validation-errors ul li {
    margin-bottom: 5px;
}

.contact-form-wrapper .wpcf7-spam-blocked {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* Required field marker */
.contact-form-wrapper .required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: normal;
}

/* Form grid layout for better organization */
.contact-form-wrapper .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form-wrapper .form-row .form-col {
    flex: 1;
}

.contact-form-wrapper .form-row .form-col-half {
    flex: 0 0 calc(50% - 10px);
}

/* Contact Table */
.contact-form-wrapper .contact__table table,
.contact-form-wrapper .contact__table tbody,
.contact-form-wrapper .contact__table tr,
.contact-form-wrapper .contact__table th,
.contact-form-wrapper .contact__table td {
    border: none;
    width: 100%;
    display: block;
}
.contact-form-wrapper .contact__table table{
    margin-bottom: 30px;
}
.contact-form-wrapper .contact__table tr {
    margin-bottom: 30px;
}

.contact-form-wrapper .contact__table th,
.contact-form-wrapper .contact__table td {
    margin-bottom: 10px;
    font-weight: 400;
}

.contact-form-wrapper .contact__table th {
    font-weight: 500;
}

.contact-form-wrapper .wpcf7-checkbox {
    background: #fff;
}

.contact-form-wrapper .wpcf7-checkbox {
    display: flex;
    justify-content: flex-start;
    padding: 20px;
    gap: 7px;
}

.contact-form-wrapper .wpcf7-list-item input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 0.2em;
}

.contact-form-wrapper .wpcf7-checkbox .wpcf7-list-item label {
    display: inline-block;
    position: relative;
    padding-left: 1.4em;
}

/* お問い合わせ専用 */
.contact-form-wrapper .staff-box .wpcf7-checkbox .wpcf7-list-item {
    padding: 0 10px;
}

/* 応募フォーム専用 */
.contact-form-wrapper .contact__table .entry-form .form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-form-wrapper .contact__table .entry-form .form-row div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 49%;
}

.contact-form-wrapper .contact__table .entry-form td .field-label {
    font-size: 14px;
    font-weight: normal;
    min-width: 30px;
}

.contact-form-wrapper .contact__table .entry-form .form-row span.wpcf7-form-control-wrap {
    flex: 1;
}

.contact-form-wrapper .privacy-details,
.contact-form-wrapper .wpcf7-form p {
    font-size: 14px;
}
.contact-form-wrapper .privacy-details h5 {
    font-size: 15px;
    padding-bottom: 20px;
    font-weight: 400;
}

.contact-form-wrapper .privacy-details strong {
    font-size: 14px;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 960px) {

    .contact-form-wrapper .wpcf7-submit {
        padding: 12px 30px;
        min-width: 160px;
    }
    
    .contact-form-wrapper .form-row {
        /* flex-direction: column; */
        gap: 15px;
    }
    
    .contact-form-wrapper .form-row .form-col-half {
        flex: 1;
    }

    .contact-form-wrapper .privacy-details h5 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .contact-form-wrapper .privacy-details {
        font-size: 12px;
    }

    .contact-form-wrapper .wpcf7-list-item-label {
        font-size: 12.5px;
    }
    
    .contact-form-wrapper .wpcf7-date,
    .contact-form-wrapper .wpcf7-text,
    .contact-form-wrapper .wpcf7-email,
    .contact-form-wrapper .wpcf7-tel,
    .contact-form-wrapper .wpcf7-textarea,
    .contact-form-wrapper .wpcf7-select {
        padding: 10px 12px;
        font-size: 13px;
    }
    .contact-form-wrapper .privacy-details,
    .contact-form-wrapper .wpcf7-form p {
        font-size: 13px;
    }
    .contact-form-wrapper .privacy-details h5 {
        font-size: 14px;
        padding-bottom: 0.5rem;
    }
    .contact-form-wrapper .wpcf7-form p {
        padding-bottom: 0.5rem;
    }
    .contact-form-wrapper .wpcf7-form .privacy-content p{
        padding-bottom:0;
    }
}

/* ========================================
   確認画面・完了画面のスタイル
======================================== */

/* 確認画面 */
.confirmation-title {
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 10px;
    text-align: left;
}

.confirmation-content {
    margin-bottom: 30px;
}

.confirmation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #858585;
}

.confirmation-table th,
.confirmation-table td {
    padding: 17px 10px;
    text-align: left;
    border: 1px solid #858585;
    vertical-align: top;
}

.confirmation-table th {
    background-color: #D6D5D5;
    font-weight: 500;
    width: 400px;
}

.confirmation-table td {
    line-height: 1.6;
    background: #fff;
}

.confirmation-table tr:last-child th,
.confirmation-table tr:last-child td {
    border-bottom: none;
}

/* 確認画面のボタン */
.confirmation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 30px;
    gap: 20px;
}

.contact-form-wrapper .wpcf7-submit,
.contact-form-wrapper .btn-back,
.contact-form-wrapper .btn-submit {
    background-color: #171717;
    color: #fff;
    padding: 20px 30px;
    max-width: 250px;
    width: 100%;
    border: none;
    border-radius: 0;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
}

.contact-form-wrapper .wpcf7-spinner {
    display: none;
}

.contact-form-wrapper .btn-back {
    background-color: #888888;
    color: #fff;
}

.contact-form-wrapper .btn-back:hover {
    opacity: 0.7;
}

.contact-form-wrapper .btn-submit {
    background-color: #333;
    color: #fff;
}

.contact-form-wrapper .btn-submit:hover {
    background-color: #222;
}

/* 完了画面 */
.page-contact-thanks .contact-form-section .section-title {
    font-family: var(--font-family-shippori-mincho), serif;
    font-weight: 500;
}

.page-contact-thanks .contact-form-section .section-title::before {
    top: 4px;
}

.completion-screen {
    padding: 0px;
    margin-top: 0px;
}

.completion-icon {
    margin-bottom: 20px;
}

.completion-message {
    margin-bottom: 30px;
}

.completion-message p {
    margin-bottom: 30px;
}

.completion-message p:last-child {
    margin-bottom: 55px;
}

.completion-message h3 {
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 0.3rem;
}

.completion-buttons {
    margin: 0 auto;
    margin-top: 30px;
    text-align: center;
}

.btn-new-inquiry {
    background-color: #171717;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    padding: 25px 30px;
    max-width: 250px;
    width: 100%;
}

.btn-new-inquiry:hover {
    opacity: 0.7;
}

/* レスポンシブ対応 */
@media (max-width: 960px) {

    .confirmation-table {
        font-size: 13px;
        border: none;
    }
    
    .confirmation-table th,
    .confirmation-table td {
        display: block;
        width: 100%;
        padding: 10px 8px;
        margin-top: -1px;
    }

    .confirmation-table tr:last-child th,
    .confirmation-table tr:last-child td {
        border-bottom: 1px solid #858585;
    }
    
    .btn-back,
    .btn-submit {
        padding: 10px 20px;
        font-size: 15px;
        margin: 5px 4px;
        min-width: 100px;
    }
    
    .completion-title {
        font-size: 20px;
    }
    
    .check-icon {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 24px;
    }
    
    .btn-new-inquiry {
        font-size: 15px;
    }

    #contact-form-completion .section-title {
        margin-bottom: 35px;
    }

    .completion-message p {
        margin-bottom: 30px;
        font-size: 14px;
    }

}

@media (max-width: 768px) {
    .wpcf7-list-item {
        margin: 0;
    }
}

@media (max-width: 640px) {
    #contact-form-completion .section-title {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {

    .confirmation-title {
        font-size: 14px;
    }
    
    .confirmation-table {
        font-size: 13px;
    }
    
    .confirmation-table th,
    .confirmation-table td {
        padding: 10px 5px;
    }
    
    .confirmation-buttons {
        gap: 15px;
    }

    .contact-form-wrapper .wpcf7-submit,
    .contact-form-wrapper .btn-back,
    .contact-form-wrapper .btn-submit {
        padding: 20px 30px;
        margin: 0;
        font-size: 14px;
    }

    .contact-form-wrapper .btn-confirm {
        padding: 20px 30px;
        font-size: 14px;
    }
    
    .btn-back,
    .btn-submit {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 12px;
        min-width: auto;
        font-size: 14px;
    }
    
    .completion-title {
        font-size: 18px;
    }
    
    .btn-new-inquiry {
        padding: 20px 30px;
        max-width: 250px;
        font-size: 14px;
    }

    .contact-form-wrapper .contact__table .entry-form .form-row div {
        width: 100%;
    }

    #contact-form-completion .section-title {
        margin-bottom: 20px;
    }

    .completion-message p {
        margin-bottom: 30px;
        font-size: 13px;
    }

    .completion-message h3 {
        font-size: 15px;
    }

    .completion-message p:last-child {
        margin-bottom: 30px;
    }

    .contact-form-wrapper .wpcf7-response-output {
        font-size: 13px;
    }
}