/**
 * Referral Page Styles
 * 紹介特典制度ページ固有のCSS
 *
 * 元ページ (app.kaigojob-academy.com/forms/school_002/p01) から抽出。
 * - school_002-3.css（ページレイアウト）
 * - form_school_002.css（フォームフィールド）
 * - destyle リセットは除外（WordPress側で対応）
 * - HubSpot CDN画像URLをテーマディレクトリパスに変換
 */

/* =====================================================
   Scoped Reset (destyle equivalent)
   WordPress テーマのデフォルトスタイルが干渉しないように
   .referral-page 内でリセットを適用
   ===================================================== */

.referral-page *,
.referral-page ::before,
.referral-page ::after {
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    min-width: 0;
}

.referral-page ul,
.referral-page ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.referral-page p {
    margin: 0;
}

.referral-page a {
    background-color: transparent;
    text-decoration: none;
    color: inherit;
}

.referral-page button,
.referral-page input,
.referral-page optgroup,
.referral-page select,
.referral-page textarea {
    appearance: none;
    vertical-align: middle;
    color: inherit;
    font: inherit;
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
    text-align: inherit;
    text-transform: inherit;
}

.referral-page dl,
.referral-page dt,
.referral-page dd {
    margin: 0;
    padding: 0;
}

.referral-page small {
    font-size: inherit;
}

.referral-page picture {
    display: contents;
}

/* =====================================================
   Base
   ===================================================== */

.referral-page {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 400;
    color: #041026;
    line-height: 16px;
    background: #fff;
    /* 元ページでは .c-container が header/footer を含むが、
       WordPress版では header/footer が外にあるため body レベルで制御 */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.referral-page > main {
    flex: 1;
}

.referral-page img {
    width: 100%;
    height: auto;
}

.referral-page em,
.referral-page i {
    font-style: normal;
}

/* =====================================================
   Container
   ===================================================== */

.c-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 3rem;
}

@media (width <= 667px) {
    .c-container {
        gap: 2rem;
    }
}

/* =====================================================
   Header (.c-header)
   ===================================================== */

.c-header {
    width: min(100%, 680px);
    margin: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 8px;
}

.c-header img {
    width: 101px;
}

.c-header p {
    color: #7b7b7b;
    font-size: 10px;
    letter-spacing: .5px;
}

@media (width <= 667px) {
    .c-header {
        padding: 16px;
    }
    .c-header img {
        width: 76px;
    }
    .c-header p {
        display: none;
    }
}

/* =====================================================
   Footer (.c-footer)
   ===================================================== */

.c-footer {
    width: 100%;
}

.c-footer__inner {
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (width <= 350px) {
    .c-footer__inner {
        padding: 14px 6px;
    }
}

.c-footer ul {
    width: min(100%, 360px);
    margin: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.c-footer ul li {
    width: 33.3333333333%;
}

.c-footer ul li:nth-child(1) img {
    width: 80px;
}

.c-footer ul li:nth-child(2) img {
    width: 90px;
}

.c-footer ul li:nth-child(3) img {
    width: 60px;
}

.c-footer ul li img {
    width: 100%;
    height: 100%;
}

.c-footer ul li a {
    display: grid;
    place-items: center;
}

@media (width <= 667px) {
    .c-footer ul li:nth-child(3) img {
        width: 56px;
    }
}

.c-footer__copyright {
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

/* =====================================================
   Inner Wrapper
   ===================================================== */

.p-inner {
    width: min(100%, 680px);
    margin: auto;
    padding: 0 24px;
    box-sizing: content-box;
}

@media (width <= 728px) {
    .p-inner {
        box-sizing: border-box;
    }
}

@media (width <= 350px) {
    .p-inner {
        padding: 0 12px;
    }
}

/* =====================================================
   Title Section (リボン装飾 = CSS pseudo-elements)
   ===================================================== */

.p-title {
    margin: 0 0 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.p-title::before,
.p-title::after {
    content: "";
    display: block;
}

.p-title::before {
    background: url("../images/referral/ribbon_l.png") no-repeat;
    background-size: 100% 100%;
    width: 104px;
    aspect-ratio: 209 / 172;
}

.p-title::after {
    background: url("../images/referral/ribbon_r.png") no-repeat;
    background-size: 100% 100%;
    width: 109px;
    aspect-ratio: 219 / 185;
}

@media (width <= 667px) {
    .p-title {
        gap: 0;
        align-items: flex-end;
    }
    .p-title::before {
        background: url("../images/referral/ribbon_l_sp.png") no-repeat;
        background-size: 100% 100%;
        width: 53px;
        aspect-ratio: 54 / 76;
    }
    .p-title::after {
        background: url("../images/referral/ribbon_r_sp.png") no-repeat;
        background-size: 100% 100%;
        width: 62px;
        aspect-ratio: 125 / 146;
        margin: 0 0 0 -8px;
    }
}

@media (width <= 667px) and (width <= 350px) {
    .p-title {
        gap: 8px;
    }
}

@media (width <= 667px) {
    .p-title::before {
        width: 48px;
    }
    .p-title::after {
        width: 62px;
    }
}

.p-title__text {
    text-align: center;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 3px;
    line-height: 38px;
}

.p-title__text em {
    display: block;
    color: #f7700e;
    font-size: 26px;
    letter-spacing: 5px;
}

@media (width <= 667px) {
    .p-title__text {
        font-size: 20px;
        letter-spacing: 3px;
        line-height: 32px;
    }
    .p-title__text em {
        font-size: 24px;
    }
}

@media (width <= 350px) {
    .p-title__text {
        font-size: 17px;
    }
    .p-title__text em {
        font-size: 19px;
    }
}

/* =====================================================
   Main Visual (キャラクター装飾 = CSS pseudo-elements)
   ===================================================== */

.p-mv {
    position: relative;
}

.p-mv::before,
.p-mv::after {
    content: "";
    position: absolute;
    display: block;
    z-index: 1;
}

.p-mv::before {
    background: url("../images/referral/mv_l.png") no-repeat;
    background-size: 100% 100%;
    width: 82px;
    aspect-ratio: 164 / 391;
    left: 15%;
    bottom: -28px;
}

.p-mv::after {
    background: url("../images/referral/mv_r.png") no-repeat;
    background-size: 100% 100%;
    width: 82px;
    aspect-ratio: 164 / 249;
    right: 12%;
    top: -18px;
}

@media (width <= 667px) {
    .p-mv::before {
        width: 61px;
        left: 0;
        bottom: -37px;
    }
    .p-mv::after {
        width: 63px;
        right: 0;
        top: -30px;
    }
}

@media (width <= 350px) {
    .p-mv::before {
        width: 50px;
        left: 0;
        bottom: -30px;
    }
    .p-mv::after {
        width: 54px;
        right: 0;
        top: -27px;
    }
}

/* =====================================================
   Content Section
   ===================================================== */

.p-content {
    padding: 14px 24px 24px;
    border-left: 1px solid #fbda8e;
    border-right: 1px solid #fbda8e;
    border-bottom: 1px solid #fbda8e;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (width <= 667px) {
    .p-content {
        padding: 14px 16px 16px;
    }
}

.p-content__title {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 34px;
}

@media (width <= 667px) {
    .p-content__title {
        font-size: 16px;
    }
}

/* ----- Lead (ルール一覧) ----- */

.p-content__lead {
    background: #fffdf6;
    padding: 14px 16px 16px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.p-content__lead ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-content__lead li {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 26px;
}

.p-content__lead li::before {
    content: "\30FB";
}

.p-content__lead li em {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    color: #9f7f46;
}

@media (width <= 667px) {
    .p-content__lead li {
        font-size: 14px;
        line-height: 24px;
    }
}

/* ----- Step (お申し込みの流れ) ----- */

.p-content__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.p-content__step ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.p-content__step dt {
    margin: 0 0 10px;
    background: #0dc569;
    color: #fff;
    width: 64px;
    height: 24px;
    border-radius: 2px;
    display: grid;
    place-items: center;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 25px;
    letter-spacing: 2px;
}

.p-content__step dt span {
    transform: translateY(-2px);
}

.p-content__step dd {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 2px;
}

.p-content__step dd em {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    color: #f7700e;
}

.p-content__step dd small {
    font-size: 15px;
    display: flex;
    gap: 2px;
}

.p-content__step dd small::before {
    content: "\25B6\FE0E";
    color: #f7700e;
    transform: scaleY(0.9);
    display: inline-block;
    font-size: .8em;
}

@media (width <= 667px) {
    .p-content__step dt {
        margin: 0 0 6px;
        width: 62px;
        height: 22px;
        font-size: 14px;
        line-height: 24px;
    }
    .p-content__step dd {
        font-size: 15px;
        line-height: 26px;
    }
    .p-content__step dd small {
        font-size: 14px;
    }
}

@media (width <= 350px) {
    .p-content__step dd small {
        font-size: 13px;
        letter-spacing: 1px;
    }
}

/* =====================================================
   Form Section
   ===================================================== */

.p-form {
    width: min(100%, 462px);
    margin: auto;
}

/* 点線コネクター */
.p-form::before {
    content: "";
    width: 0;
    height: 32px;
    border: .5px dashed #fbda8e;
    display: block;
    margin: 8px auto;
}

.p-form__title {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 3px;
    text-align: center;
    margin: 0 0 16px;
}

.p-form__head {
    margin: 0 0 24px;
}

.p-form__head p {
    text-align: center;
    padding: 16px;
    background: #fffdf6;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 30px;
    letter-spacing: 2px;
}

.p-form__head p em {
    color: #f7700e;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
}

@media (width <= 667px) {
    .p-form__head {
        margin: 0 0 20px;
    }
    .p-form__head p {
        text-align: justify;
        padding: 8px;
        font-size: 15px;
        line-height: 26px;
    }
}

/* ----- Form Body (元ページの dt/dd 構造用スタイル) ----- */

.p-form__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.p-form__body dt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 12px;
}

.p-form__body dt p {
    display: flex;
    place-items: center;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 17px;
    line-height: 30px;
    letter-spacing: 3px;
}

.p-form__body dt p span {
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 13px;
    line-height: 29px;
    letter-spacing: 1px;
}

.p-form__body dt div {
    display: grid;
    place-items: center;
    background: #ff5252;
    width: 35px;
    height: 22px;
    border-radius: 2px;
    padding: 0 6px 2px;
    color: #fff;
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 1px;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 400;
}

.p-form__body dd input[type="text"],
.p-form__body dd input[type="tel"],
.p-form__body dd select {
    width: 100%;
    height: 52px;
    border-radius: 4px;
    background: #fffceb;
    border: 1px solid #fbda8e;
    padding: 10px 16px 12px;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 2px;
}

.p-form__body dd input[type="text"]:focus,
.p-form__body dd select:focus {
    outline: 1px solid #80ced8;
    border: 1px solid #80ced8;
}

.p-form__body dd input[type="text"]::placeholder {
    color: #7b7b7b;
}

.p-form__body dd small {
    display: block;
    margin: 8px 0 0;
    color: #7b7b7b;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 1px;
}

/* セレクトボックス */
.p-form__select {
    position: relative;
    cursor: pointer;
}

.p-form__select::after {
    content: "";
    width: 11px;
    height: 11px;
    border-top: solid 2px #041026;
    border-right: solid 2px #041026;
    transform: translateY(-50%) rotate(135deg);
    position: absolute;
    top: 45%;
    right: 20px;
}

.p-form__select select {
    cursor: pointer;
}

.p-form__select select:invalid {
    color: #7b7b7b;
}

.p-form__select select option {
    color: #7b7b7b;
}

/* =====================================================
   Referral Form Fields
   (FormBuilder ショートコード [school_002_form] 使用時)
   紹介特典ページ専用の p-form__field ベースのスタイル
   ===================================================== */

/* ----- Field Layout ----- */

.p-form__field {
    margin: 0 0 20px;
}

.p-form__field label {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin: 0 0 4px;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 2px;
    color: #212d3a;
}

.p-form__required {
    color: #ff5252;
    font-weight: 600;
    font-size: 16px;
}

/* ----- Hint Text ----- */
/* .referral-page p { margin: 0 } より詳細度を上げるため .referral-page を付与 */

.referral-page .p-form__hint {
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 16px;
    color: rgba(81, 99, 131, 0.87);
    margin: 0 0 6px;
    padding: 0 2px;
    font-weight: 400;
}

/* ----- Input / Select Fields ----- */

.p-form__input-wrap input[type="text"],
.p-form__input-wrap input[type="email"],
.p-form__input-wrap input[type="tel"],
.p-form__input-wrap select {
    width: 100%;
    height: 52px;
    border-radius: 4px;
    background: #fffceb;
    border: 1px solid #fbda8e;
    padding: 10px 16px 12px;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.p-form__input-wrap input:focus,
.p-form__input-wrap select:focus {
    outline: 1px solid #80ced8;
    border: 1px solid #80ced8;
}

.p-form__input-wrap input::placeholder {
    color: #7b7b7b;
}

.p-form__input-wrap select {
    cursor: pointer;
}

.p-form__input-wrap select:invalid {
    color: #7b7b7b;
}

.p-form__input-wrap select option {
    color: #7b7b7b;
}

/* ----- Error Message (JS互換: form-input__body--error) ----- */

.referral-page .form-input__body--error {
    color: #ff5252;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ----- Submit Area ----- */

.referral-page .form-submit {
    width: 100%;
    display: grid;
    place-items: center;
}

/* 同意テキスト */
/* .referral-page p { margin: 0 } より詳細度を上げるため .referral-page を付与 */
.referral-page .p-form__terms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin: 32px 0 16px;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 1px;
    color: #33475b;
}

.p-form__terms a {
    color: #2aa6ff;
    text-decoration: underline;
}

/* 送信ボタンラッパー */
.p-form__submit {
    display: grid;
    place-items: center;
    width: 100%;
}

/* 送信ボタン */
/* .referral-page button のスコープリセットより詳細度を上げる */
.referral-page .p-form__submit-button {
    display: block;
    text-align: center;
    width: min(237px, 100%);
    height: 57px;
    border-radius: 9999px;
    border: none;
    background: #0dc569;
    color: #fff;
    font-size: 18px;
    letter-spacing: 2px;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 500;
    padding: 0 16px 2px;
    box-shadow: 0 1px 9px 0 rgba(0, 0, 0, .2);
    transition: .3s box-shadow;
    line-height: 57px;
    cursor: pointer;
}

.referral-page .p-form__submit-button:hover {
    box-shadow: 0 1px 9px 0 rgba(0, 0, 0, .35);
}

/* JS互換: disabled状態 */
.referral-page .form-submit__button--disabled.p-form__submit-button,
.referral-page .form-submit__button:disabled.p-form__submit-button {
    background: #ccc;
    color: #fff;
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
}

/* 送信中オーバーレイ */
.referral-page .form-submit__overlay {
    display: none;
}

/* =====================================================
   Terms Modal (利用規約モーダル)
   ===================================================== */

.campaign-form__modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    display: none;
    place-items: center;
}

.campaign-form__modal.visible {
    display: grid;
}

.campaign-form__modal-inner {
    width: min(90%, 680px);
    height: 80vh;
    height: 80svh;
    border-radius: 4px;
    padding: 54px 16px 24px;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.referral-page .campaign-form__modal-inner button {
    cursor: pointer;
    width: 34px;
    aspect-ratio: 1 / 1;
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
}

/* =====================================================
   Thanks Page
   ===================================================== */

.p-thanks {
    display: grid;
    place-items: center;
    margin: 3rem auto;
}

.p-thanks__title {
    text-align: center;
    font-family: YakuHanJPs, "Noto Sans JP", sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 22px;
    line-height: 38px;
    letter-spacing: 3px;
}

@media (width <= 667px) {
    .p-thanks__title {
        font-size: 20px;
        line-height: 34px;
        letter-spacing: 2px;
    }
}

/* =====================================================
   Utilities
   ===================================================== */

/* --- PC/SP 表示切替 --- */
.u-show--sp {
    display: none;
}

.u-show--pc {
    display: block;
}

@media (width <= 667px) {
    .u-show--sp {
        display: block;
    }
    .u-show--pc {
        display: none;
    }
}

/* --- PC/SP 改行切替 --- */
.u-br--sp {
    display: none;
}

.u-br--pc {
    display: block;
}

@media (width <= 667px) {
    .u-br--sp {
        display: block;
    }
    .u-br--pc {
        display: none;
    }
}
