/* ========================================
   contact page layout
   ======================================== */


body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    padding-top: 5.25rem;
}

/* ========================================
   contact form container
   ======================================== */

#inquery {
    width: 100%;
    background: url('../images/bg_contact_pc.png') no-repeat center top;
    background-size: cover;
    padding-bottom: 100px;
    min-height: 100vh;
    margin-bottom: 2rem;
}

#inquery .inquery-inner {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 140px;
    background-color: white;
}

#inquery header {
    text-align: center;
    margin-bottom: 2rem;
}

#inquery h1 {
    color: #333;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

#inquery h2 {
    color: #555;
    padding-bottom: 0.625rem;
    font-size: 42px;
    font-weight: bold;
    color: #0154A6;
}

#inquery h2+p {
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

#inquery .attention {
    text-align: center;
    font-size: 12px;
    color: #555;
    margin-bottom: 60px;
}

#inquery .label-required {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
    color: #dc3545;
}

#inquery .label-required span {
    display: block;
    border: 1px solid #dc3545;
    font-weight: bold;
    padding: 6px 10px;
}


/* ========================================
   section title contact (same style as top page)
   ======================================== */

.section-title-contact {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #0154A6;
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.section-title-contact::after {
    content: "contact";
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 1.375rem;
    color: #8EB4DA;
}

/* ========================================
   form elements
   ======================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    display: block;
    font-weight: bold;
    font-size: 1rem;
}

.form-group > label:first-child {
    /* form-groupの最初のlabelのみのスタイル */
    color: #0154A6;
    height: 1rem;
}

.required {
    color: #dc3545;
}

input, 
textarea, 
select {
    width: 100%;
    padding: 0.625rem;
    border: 0.0625rem solid #ddd;
    border-radius: 0.375rem;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

/* プルダウンのスタイル調整 */
select {
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select:focus {
    border-color: #0154A6;
    outline: none;
    box-shadow: 0 0 0 0.125rem rgba(1, 84, 166, 0.25);
}

input::placeholder,
textarea::placeholder {
    color: #C7C7C7;
}

textarea {
    height: 7.5rem;
    resize: vertical;
}

.privacy-policy-text textarea {
    height: 12.5rem;
    resize: none;
    background-color: #f8f9fa;
    border: 0.0625rem solid #e9ecef;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
}

/* ========================================
   form groups
   ======================================== */

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

#contactForm > div {
    width: 100%;
}

.radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 0.625rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #B4B4B4;
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
    position: relative;
}

.radio-group input[type="radio"]:checked {
    border-color: #0154A6;
}

.radio-group input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #0154A6;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    justify-content: center;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #B4B4B4;
    border-radius: 2px;
    background-color: white;
    cursor: pointer;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
    border-color: #0154A6;
    background-color: white;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    background-color: #0154A6;
    border-radius: 2px;
}

.checkbox-group label {
    font-weight: normal;
    cursor: pointer;
}

/* ========================================
   buttons
   ======================================== */

button {
    display: inline-block;
    background-color: #0154A6;
    color: white;
    padding: 18px 50px;
    border: none;
    cursor: pointer !important;
    font-size: 24px;
    margin-right: 0.625rem;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: bold;
}



button:hover {
    background-color: #0056b3;
}

button[type="submit"],
#submit-final,
#back-to-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 100%;
    width: auto;
    min-width: 200px;
}

button[type="submit"]::after,
#submit-final::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 14px;
    background-image: url('../images/icon_nextarrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 8px;
    position: absolute;
    right: 1rem;
}

#back-to-edit::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 14px;
    background-image: url('../images/icon_nextarrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: scaleX(-1);
    margin-right: 8px;
    position: absolute;
    left: 1rem;
}

button.secondary {
    background-color: #6c757d;
}

button.secondary:hover {
    background-color: #545b62;
}

button.debug {
    background-color: #28a745;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

button.debug:hover {
    background-color: #218838;
}

button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

button:disabled:hover {
    background-color: #6c757d;
}

button.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

button.disabled:hover {
    background-color: #6c757d;
}

/* ========================================
   messages
   ======================================== */

.error {
    color: #dc3545;
    font-size: 0.875rem;
    display: none;
}

.error:not(:empty) {
    display: block;
}

.success {
    color: #28a745;
    font-size: 0.875rem;
}

.help-text {
    font-size: 14px;
    color: #333333;
}

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

/* ========================================
   confirmation section
   ======================================== */

.confirm-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 2rem;
    padding: 0;
}

.confirm-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confirm-group label {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    color: #0154A6;
    height: 1rem;
}

.confirm-content {
    width: 100%;
    padding: 0.625rem;
    border: 0.0625rem solid #ddd;
    border-radius: 0.375rem;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f9fa;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.confirm-buttons {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

/* ========================================
   completion section
   ======================================== */

#complete {
    text-align: center;
    padding: 0;
}

#complete p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0;
    line-height: 1.6;
}

#complete button {
    margin-top: 2rem;
}

/* ========================================
   responsive design (SP)
   ======================================== */

@media (max-width: 768px) {

    html,body {
        font-size: 2.67vw !important; /* 1rem = 10px相当 (375px基準) */
    }

    #inquery {
        background: none;
    }

    #inquery .inquery-inner {
        width: 100%;
        padding: 4rem 2rem;
    }
    
    .section-title-contact {
        font-size: 2rem;
    }
    
    .section-title-contact::after {
        font-size: 1.125rem;
    }
    
    #inquery h2 {
        font-size: 32px;
    }
    
    #inquery h2+p {
        font-size: 1.4rem;
        text-align: left;
    }
    
    #inquery .attention {
        font-size: 1.2rem;
        text-align: left;
        margin-bottom: 1.5rem;
    }

    .label-required {
        font-size: 1.2rem;
        text-align: left;
        margin-bottom: 0;
    }

    #contactForm {
        gap: 2.4rem;
    }
    
    .form-group {
        gap: 8px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .radio-group label {
        font-size: 1.6rem;
    }
    
    .form-group > label:first-child {
        font-size: 1.6rem;
        height: 1.6rem;
        margin-bottom: 0.6rem;
    }
    
    .confirm-group label {
        font-size: 1.6rem;
        height: 1.6rem;
    }
    
    .help-text {
        font-size: 1.4rem;
        line-height: 2.2rem;
    }
    
    .error {
        font-size: 1.2rem;
    }
    
    .checkbox-group label {
        font-size: 1.4rem;
    }
    
    .radio-group input[type="radio"] {
        width: 2rem;
        height: 2rem;
        border: 0.125rem solid #B4B4B4;
    }
    
    .radio-group input[type="radio"]:checked::after {
        width: 1rem;
        height: 1rem;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 2rem;
        height: 2rem;
        border: 0.125rem solid #B4B4B4;
        border-radius: 0.125rem;
    }
    
    .checkbox-group input[type="checkbox"]:checked::after {
        width: 1.3rem;
        height: 1.3rem;
        border-radius: 0.125rem;
    }
    
    input, 
    textarea, 
    select {
        padding: 0.7rem;
        font-size: 1.5rem;
    }
    
    textarea {
        height: 14rem;
    }
    
    .privacy-policy-text textarea {
        height: 18rem;
        font-size: 1.2rem;
        padding: 1em;
        margin-bottom: 0.8rem;
    }
    
    button {
        padding: 14px 30px;
        font-size: 18px;
        margin-right: 0.5rem;
    }

    .confirm-form {
        gap: 1.5rem;
    }
    
    .confirm-content {
        padding: 0.5rem;
        font-size: 1.2rem;
        min-height: 2rem;
    }
    
    .confirm-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
    }
    
    .confirm-buttons button:not(.debug) {
        width: 46% !important;
        min-width: 0 !important;
        flex-shrink: 0;
    }
    
    .confirm-buttons button.debug {
        width: 100%;
        max-width: 300px;
        margin-top: 0.5rem;
        order: 3;
    }
    
    #complete {
        padding: 0;
    }
    
    #complete p {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    #complete button {
        width: 100%;
        max-width: 300px;
        margin-top: 1.5rem;
    }
}

/* ========================================
   loading overlay
   ======================================== */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0154A6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #0154A6;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}