/* =========================
   CONTACT
========================= */
:root {
    --base-color: #ffd700;
    --sub_base-color: #000000;
    --front_color: #ffffff;
    --event_color: #ff6347;
    --entry_color: #00bfff;
    --lace_color: #4169E1;
}

#contact {
    height: auto;
    padding-bottom: 2rem;
    background-color: var(--base-color);
}

.contact_area {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.contact_area_for {
    width: 38%;
    height: 660px;
}

.contact-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
}

.contact-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    position: relative;
}

.contact-form label span {
    position: absolute;
    top: 0;
    right: 0;
}

#inquiry-type {
    margin-bottom: 0.8rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form7 {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-form7 {
    margin-top: 5px;
    margin-bottom: 10px;
    background-color: var(--entry_color);
}

.contact-form textarea {
    resize: none;
    height: 90px;
    display: block;
    min-width: 0;
}

#details_form {
    height: 4rem;
    font-size: 0.7rem;
    padding: 4px 8px;
}

.confirmation {
    display: flex;
    flex-direction: column;
}

.confirmation h2 {
    font-size: 1.5rem;
    color: var(--sub_base-color);
    font-family: "Kosugi", sans-serif;
    margin-bottom: 0.5rem;
    text-align: center;
}

.required {
    background-color: #f4b7e3;
}

.error-message {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 16px;
    color: var(--event_color);
}

/* =========================
   PRIVACY POLICY
========================= */
.privacy_policy {
    width: 60%;
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    height: 660px;
    overflow-y: scroll;
    box-sizing: border-box;
    background-color: var(--front_color);
    border-radius: 8px;
}

.privacy_policy h2 {
    font-size: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
}

.privacy_policy h3 {
    font-size: 1.5rem;
    padding: 1rem 0 0.5rem 0;
    color: var(--sub_base-color);
    font-family: "Kosugi", sans-serif;
}

.privacy_policy p {
    padding-bottom: 1rem;
    line-height: 1.5;
}

.privacy_policy ul li {
    list-style-type: circle;
    padding: 0 0 0.5rem 0;
}

/* =========================
   BUTTON / AGREEMENT
========================= */
.button_area {
    margin-top: 20px;
}

.button_area button {
    width: 450px;
    padding: 20px 0;
    font-weight: 600;
    background-color: #4CAF50;
    color: var(--front_color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.button_area_kakunin {
    text-align: center;
}

.button_area button:hover {
    background-color: #45a049;
}

.agreement {
    margin: 3rem 0 2rem 0;
    text-align: center;
}

.agreement p {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.agreement input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(2);
    margin-bottom: 5px;
}

.disabled {
    cursor: not-allowed;
}

.required_label,
.any_label {
    display: inline;
    color: var(--front_color);
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 8px;
    text-align: center;
    user-select: none;
}

.required_label {
    background-color: var(--event_color);
}

.any_label {
    background-color: var(--lace_color);
}

/* =========================
   MODAL
========================= */
.modal{
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,.5);

  display: none; /* 開く時はJSで block/flex にする */
  justify-content: center;

  /* ここが肝：上寄せにしてヘッダー分だけ下げる */
  align-items: flex-start;
  padding-top: 90px; /* ← ヘッダー高さに合わせて調整 */
  padding-bottom: 24px; /* 下の余白（安全） */

  /* 長い時に背景側がスクロールしないようにするなら不要。
     逆に “画面が低い時も少しはスクロールで逃がす”なら入れる */
  overflow-y: auto;
}

.modal-content{
  background: #fff;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 8px;
  width: min(600px, 90%);
  
  /* ここが肝：モーダル内スクロール */
  max-height: calc(100vh - 90px - 24px);
  overflow-y: auto;
}


.modal-text {
    font-size: 0.8rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal button,
#send {
    width: 50%;
    padding: 20px 0;
    color: var(--front_color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal button {
    background-color: #4CAF50;
}

#send {
    background-color: var(--event_color);
}

.modal button:hover {
    background-color: #45a049;
}

.modal_button p {
    display: flex;
}

@media screen and (max-width: 1100px) and (min-height: 1100px) {
    #contact {
        height: 90vh;
    }

    .contact_area {
        margin-top: 2rem;
    }

    .agreement {
        margin-top: 4rem;
    }

}

@media screen and (max-width :767px) {

    #contact {
        height: auto;
        padding-bottom: 1rem;
    }

    .contact_area {
        flex-direction: column;
    }

    .contact_area_for {
        width: 100%;
        margin-bottom: 0.5rem;

    }

    .privacy_policy {
        width: 100%;
        height: 300px;
    }

    .privacy_policy h2 {
        font-size: 1.5rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .privacy_policy h3 {
        font-size: 1.2rem;
        padding: 0.5rem 0 0.3rem 0;
    }

    .privacy_policy p {
        padding-bottom: 0.8rem;
    }

    .privacy_policy ul li {
        font-size: 0.9rem;
    }

    .button_area button {
        width: 300px;
    }

    .modal-content {
        padding: 15px;
    }

    .confirmation h2 {
        font-size: 1.1rem;
    }

    #details_form {
        height: 3rem;
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .modal button,
    #send {
        padding: 10px 0;
    }
}

.success-box {
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.success-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-text {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.success-close {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #333;
    background: #fff;
    cursor: pointer;
}

.error-box {
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.error-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.error-text {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.error-close {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #333;
    background: #fff;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}