/* 2026testsite 埋め込み用。body セレクタ置換後も class 名競合を避けるためラッパー配下に限定 */

/*
 * rem 基準を 2026testsite（ブラウザ既定相当の 16px）に揃える。
 * 他スタイルで html の font-size が変わると、例: 2.25rem が 36px にならずタイトル・余白がずれる。
 * このファイルは testsite 系固定ページでのみ enqueue される。
 */
html:has(main.p_testsitetw2026_root) {
    font-size: 16px;
}

/*
 * opencampus2026: sass/style.scss の body が z-index:-1・グラデ背景のため、2026testsite（body: Tailwind bg-white）と
 * 固定レイヤー（z-index:-10 / -9）の重なりが崩れる。ページ時のみフラットな白背景・z-index をリセットする。
 */
body:has(main.p_testsitetw2026_root.p_opencampus2026_page) {
    position: relative;
    z-index: 0;
    background-color: #ffffff;
    background-image: none;
}

.p_testsitetw2026_root {
    min-height: 40vh;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
    font-feature-settings: "palt";
    -webkit-font-smoothing: antialiased;
}

/*
 * テーマ style.css の img { width:100% } を打ち消す。
 * Tailwind の w-* / max-w-* 等（class に "w-" を含む）は除外し、ロゴのような高さ指定のみの img は内容幅に戻す。
 */
.p_testsitetw2026_root img:not([class*="w-"]) {
    width: auto;
    max-width: 100%;
}

/*
 * tohighschool / bosyuyoukou: headline 画像の width はテーマ img リセットを打ち消す。
 * display は触らない（.desktop / .mobile の display:none 切替より詳細度が高くなり、常にモバイル側が見える不具合になるため）。
 */
.p_testsitetw2026_root.p_tohighschool2026_page .header-image img,
.p_testsitetw2026_root.p_bosyuyoukou2026_page .header-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* campuslife_contents.php の gradient */
.p_testsitetw2026_root.p_testsitetw2026--campus .gradient-bg {
    background: linear-gradient(90deg, #005cce 0%, #00a0e9 100%);
}

.p_testsitetw2026_root.p_testsitetw2026--campus .gradient-text {
    background: linear-gradient(90deg, #005cce 0%, #00a0e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.p_testsitetw2026_root.p_testsitetw2026--brand .gradient-bg {
    background: linear-gradient(to right, #005bce, #693bd2);
}

.p_testsitetw2026_root.p_testsitetw2026--brand .gradient-text {
    background: linear-gradient(to right, #005bce, #693bd2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* point2026 抽出CSSの .gradient-text と同様の太さ（他 --brand ページは 900 を強制しない） */
.p_testsitetw2026_root.p_testsitetw2026--brand.p_point2026_page .gradient-text {
    font-weight: 900;
}

/*
 * tohighschool / bosyuyoukou: 2026testsite は青→シアン。--brand 共通の紫グラデより後勝ちさせる。
 */
.p_testsitetw2026_root.p_testsitetw2026--brand.p_tohighschool2026_page .gradient-text,
.p_testsitetw2026_root.p_testsitetw2026--brand.p_bosyuyoukou2026_page .gradient-text {
    background: linear-gradient(90deg, #005cce 0%, #00a0e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* point: PROLINK 7カード「詳しくはこちら」（flex 列の子を SP/PC とも水平中央） */
.p_testsitetw2026_root.p_point2026_page .p_point2026_content #employment .flex.flex-col.justify-between>a.gradient-bg {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
}

/* point: 先頭ナビ4ボタン（destyle で枠が消える・rounded も保険） */
.p_testsitetw2026_root.p_testsitetw2026--brand.p_point2026_page>section:nth-of-type(2) button {
    border: 1px solid #005cce;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* joblicense: ナビは main 直下1つ目の section（point と DOM 構造が異なる） */
.p_testsitetw2026_root.p_testsitetw2026--brand .p_joblicense_navbtn {
    border: 1px solid #005cce;
    border-radius: 0.5rem;
    font-weight: 600;
}

/*
 * スイッチメジャー：動的 HTML は script 内クラスのため Tailwind が効かないことがある。
 * inline の border-color に幅・スタイルを足す。
 */
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-container button[style*="border-color"],
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-mobile button[style*="border-color"],
.p_testsitetw2026_root.p_testsitetw2026--brand #modal-content button[style*="border-color"] {
    border-style: solid;
    border-width: 1px;
    border-radius: 0.5rem;
    font-weight: 600;
}

.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-container div[style*="border-color"],
.p_testsitetw2026_root.p_testsitetw2026--brand #modal-content div[style*="border-color"] {
    border-style: solid;
    border-width: 1px;
    border-radius: 0.5rem;
}

/* 塗りボタン・戻る・閉じるは枠なし（2026test 見た目） */
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-container button.text-white,
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-mobile button.text-white,
.p_testsitetw2026_root.p_testsitetw2026--brand #modal-content button.text-white,
.p_testsitetw2026_root.p_testsitetw2026--brand #modal-content button[onclick^="closeModal"],
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-container button[onclick^="goBack"],
.p_testsitetw2026_root.p_testsitetw2026--brand #switch-major-mobile button[onclick^="goBack"],
.p_testsitetw2026_root.p_testsitetw2026--brand #modal-content button[onclick^="goBack"] {
    border-width: 0;
    border-style: none;
    border-radius: 0;
}

/*
 * 2026testsite の #modal（tohighschool / bosyuyoukou の .modal、joblicense・gakka_cg の .modal-overlay、
 * opencampus / gakka_game / gakka_is の fixed オーバーレイ等）はビューポート全面。
 * style.css 由来の上書き残り・z-index を確実にし、テーマ .modal-close の黒文字汚染を防ぐ。
 */
.p_testsitetw2026_root #modal.modal {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: none;
    z-index: 9500;
    padding: 1rem;
    text-align: initial;
    box-sizing: border-box;
    background-color: transparent;
    align-items: center;
    justify-content: center;
}

.p_testsitetw2026_root #modal.modal:not(.active) {
    display: none;
}

.p_testsitetw2026_root #modal.modal.active {
    display: flex;
}

/* tohighschool / bosyuyoukou: 閉じるは白アイコン（テーマ .modal-close は黒・余白付き） */
.p_testsitetw2026_root #modal.modal .modal-close {
    font-size: 0;
    line-height: 0;
    margin: 0;
    color: #ffffff;
    font-family: inherit;
}

.p_testsitetw2026_root #modal.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    margin: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    box-sizing: border-box;
}

.p_testsitetw2026_root #modal.modal-overlay.modal-hidden {
    display: none !important;
}

/* gakka_game 等: #modal に .modal は付かない。fixed inset-0 を viewport に固定 */
.p_testsitetw2026_root #modal.fixed {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    box-sizing: border-box;
}

/* opencampus_contents: インライン z-index 相当をテーマ上書き後も維持 */
.p_testsitetw2026_root.p_opencampus2026_page #modal {
    z-index: 10001;
}

/* gakka_is_contents: #modal は z-50 定義のためヘッダーと干渉しうる → オーバーレイを最前面付近に */
.p_testsitetw2026_root.p_gakka_is2026_page #modal {
    z-index: 10050;
}

/* bosyuyoukou: PDF オーバーレイ（p_bosyuyoukou2026_pdf_overlay）をヘッダーより前面に */
@media (min-width: 768px) {
    .p_testsitetw2026_root.p_bosyuyoukou2026_page #pdfModal.p_bosyuyoukou2026_pdf_overlay {
        z-index: 10001;
    }

    .p_testsitetw2026_root.p_bosyuyoukou2026_page #pdfModal.p_bosyuyoukou2026_pdf_overlay.is-active {
        display: flex !important;
    }
}