/* =====================================================================
   採用サイト（rec.platic.jp）と同じ色・文字・部品のスタイル
   App.razor の <head> で読み込む（全ページ共通）
   ・前半：採用サイトの HTML と同じクラス（wrap / crumb / hero / section / h2 / card / box / btn など）
   ・後半：Blazor のフォーム部品（EditForm・InputText・ValidationMessage など）
   ===================================================================== */

:root {
    --ink: #262626;
    --muted: #666666;
    --bg: #ffffff;
    --page: #f0f0f0;
    --soft: #fff9ec;
    --cream: #fef4d9;
    --line: #f3dfb0;
    --brand: #ed6924;
    --brandtext: #b84a12;
    --btn: #c2501a;
    --yellow: #fcc743;
    --onbrand: #ffffff;
    --field: #ffffff;
    --fieldline: #c9c9c9;
    --error: #c62828;
    --errorbg: #fdecea;
    --ok: #2e7d32;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #eeeeee;
        --muted: #b5b5b5;
        --bg: #1e1e1e;
        --page: #141414;
        --soft: #2a2118;
        --cream: #33261a;
        --line: #4a3a28;
        --brandtext: #f5a26b;
        --field: #262626;
        --fieldline: #5a5a5a;
        --error: #ff8a80;
        --errorbg: #3a1f1f;
        --ok: #81c784;
    }

    /* オレンジの帯の上は、ダークモードでも黒い文字にする（採用サイトと同じ） */
    .hero { color: #262626; }
    .hero .tag { background: #ffffff; color: #b84a12; }
    .hero .chips span { color: #262626; }
    ol.flow li::before { color: #262626; }
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
    margin: 0;
    font-family: "Noto Sans JP", "Open Sans", "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
    color: var(--ink);
    background: var(--page);
    line-height: 1.8;
    font-size: 15px;
}

a { color: var(--brandtext); }

.wrap {
    max-inline-size: 1000px;
    margin-inline: auto;
    padding-inline: 20px;
}

/* ===== パンくず ===== */
.crumb {
    font-size: 12px;
    color: var(--muted);
    padding-block: 10px;
}

.crumb a { color: var(--muted); }

/* ===== ヒーロー（オレンジの帯） ===== */
.hero {
    background: linear-gradient(90deg, #ed6a25, #f59934 55%, var(--yellow));
    color: var(--ink);
    padding-block: 48px;
}

.hero .tag {
    display: inline-block;
    background: var(--bg);
    color: var(--brandtext);
    border-radius: 999px;
    padding-inline: 14px;
    font-size: 13px;
    font-weight: 700;
    margin-block-end: 12px;
}

.hero h1 {
    font-size: 30px;
    line-height: 1.35;
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.hero p { margin: 0; max-inline-size: 760px; }

.hero .chips {
    margin-block-start: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero .chips span {
    background: rgba(255, 255, 255, .85);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.global-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(24, 24, 24, .62), rgba(24, 24, 24, .50));
    z-index: 2000;
    pointer-events: none;
}

body.loading-ready .global-loading {
    display: none;
}

body.route-loading-active .global-loading {
    display: flex;
}

.global-loading-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .24);
}

.global-loading-logo {
    inline-size: 36px;
    block-size: 36px;
    object-fit: contain;
    display: block;
}

/* ===== 本文の区切り ===== */
section {
    background: var(--bg);
    padding-block: 40px;
}

section + section { border-block-start: 12px solid var(--page); }

section.alt { background: var(--soft); }

h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    background: var(--cream);
    border-inline-start: 5px solid var(--brand);
    padding: 8px 14px;
}

h2 + .lead { color: var(--muted); margin-block: 4px 22px; }

h3 { font-size: 17px; margin: 22px 0 8px; }

/* ===== カード・囲み・注記 ===== */
.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    border: 1px solid var(--line);
    border-block-start: 4px solid var(--brand);
    border-radius: 4px;
    padding: 20px;
    background: var(--bg);
}

.card h3 { margin-block-start: 0; color: var(--brandtext); }
.card p { margin: 0; }

a.card { display: block; text-decoration: none; color: var(--ink); }
a.card:hover { background: var(--soft); }

.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--cream);
    color: var(--brandtext);
}

.box {
    background: var(--soft);
    border-inline-start: 4px solid var(--brand);
    border-radius: 2px;
    padding: 16px 18px;
    margin-block: 14px;
}

.note { font-size: 13px; color: var(--muted); }

.route-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
    color: var(--muted);
    font-weight: 700;
}

/* ===== 表（確認画面など） ===== */
table { border-collapse: collapse; inline-size: 100%; font-size: 15px; }

th, td {
    border: 1px solid var(--line);
    padding: 14px 16px;
    vertical-align: top;
    text-align: start;
}

th {
    background: var(--cream);
    color: var(--brandtext);
    inline-size: 25%;
    font-weight: 700;
}

/* ===== 手順（入力 → 確認 → 完了） ===== */
ol.flow {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    counter-reset: s;
}

ol.flow li {
    counter-increment: s;
    flex: 1 1 160px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 16px 10px 52px;
    position: relative;
    background: var(--bg);
    color: var(--muted);
}

ol.flow li::before {
    content: counter(s);
    position: absolute;
    inset-inline-start: 14px;
    inset-block-start: 10px;
    inline-size: 28px;
    block-size: 28px;
    border-radius: 50%;
    background: var(--line);
    color: var(--ink);
    text-align: center;
    line-height: 28px;
    font-weight: 700;
    font-size: 14px;
}

ol.flow li.on { border-color: var(--brand); color: var(--ink); font-weight: 700; }
ol.flow li.on::before { background: var(--yellow); }

/* ===== ボタン ===== */
.btn {
    display: inline-block;
    background: var(--btn);
    color: var(--onbrand);
    padding: 14px 32px;
    border-radius: 999px;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    margin: 6px;
    border: 2px solid var(--btn);
    cursor: pointer;
}

.btn:hover { background: var(--brandtext); border-color: var(--brandtext); }

.btn.sub { background: var(--bg); color: var(--brandtext); border-color: var(--btn); }
.btn.sub:hover { background: var(--soft); }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.btn:focus-visible,
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.actions { text-align: center; padding-block: 24px 8px; }

/* =====================================================================
   フォーム（Blazor の EditForm / InputXxx / ValidationMessage）
   使い方の例：
     <div class="field">
         <label for="email">メールアドレス<span class="req">必須</span></label>
         <InputText id="email" @bind-Value="model.Email" />
         <p class="hint">例：taro@example.com</p>
         <ValidationMessage For="() => model.Email" />
     </div>
   ===================================================================== */

fieldset.group {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 20px 20px;
    margin: 0 0 24px;
}

fieldset.group > legend {
    font-weight: 700;
    color: var(--brandtext);
    padding-inline: 8px;
}

.field { margin-block-end: 20px; }

.field > label,
.field > .label {
    display: block;
    font-weight: 700;
    margin-block-end: 6px;
}

.row {
    display: grid;
    gap: 0 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.req, .opt {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    padding: 0 6px;
    border-radius: 3px;
    margin-inline-start: 8px;
    vertical-align: 2px;
}

.req { background: var(--btn); color: var(--onbrand); }
.opt { background: var(--page); color: var(--muted); }

.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"], input[type="month"], input[type="search"],
input:not([type]), select, textarea {
    inline-size: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--fieldline);
    border-radius: 4px;
    padding: 10px 12px;
    line-height: 1.5;
}

textarea { min-block-size: 140px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(237, 105, 36, .25);
}

input[type="checkbox"], input[type="radio"] {
    inline-size: 18px;
    block-size: 18px;
    accent-color: var(--btn);
    vertical-align: -3px;
    margin: 0 8px 0 0;
}

/* ラジオ・チェックボックスの並び */
.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.choices label {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--fieldline);
    border-radius: 4px;
    padding: 8px 14px;
    background: var(--field);
    font-weight: 400;
    cursor: pointer;
}

.choices label:has(input:checked) {
    border-color: var(--brand);
    background: var(--soft);
    font-weight: 700;
}

/* 入力チェック（Blazor が付けるクラス） */
.invalid,
input.invalid, select.invalid, textarea.invalid {
    border-color: var(--error);
    background: var(--errorbg);
}

.validation-message {
    color: var(--error);
    font-size: 13px;
    margin-block-start: 4px;
}

.validation-errors {
    list-style: none;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--error);
    border-inline-start-width: 4px;
    border-radius: 4px;
    background: var(--errorbg);
}

.validation-errors .validation-message { margin: 0; }

/* 送信結果のお知らせ */
.alert {
    border-radius: 4px;
    padding: 14px 18px;
    margin-block: 0 24px;
    border-inline-start: 4px solid var(--brand);
    background: var(--soft);
}

.alert.error { border-inline-start-color: var(--error); background: var(--errorbg); }

/* 個人情報の取り扱い（同意欄） */
.consent {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px 18px;
    max-block-size: 220px;
    overflow-y: auto;
    font-size: 13px;
}

/* ===== 応募者用フォーム（/contact）で使う部品 ===== */

/* 種類の選択（説明付きのカード型ラジオ） */
.choices.cards label {
    flex: 1 1 220px;
    align-items: flex-start;
    padding: 12px 14px;
}

.choices.cards label input { margin-block-start: 4px; flex: none; }
.choices.cards b { display: block; }
.choices.cards small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }

.choices.compact label { padding: 6px 12px; }
.choices.compact { margin-block-start: 6px; }

/* 希望日時の1行 */
.slot {
    border: 1px solid var(--line);
    border-block-start: 4px solid var(--brand);
    border-radius: 4px;
    padding: 14px 18px 4px;
    margin-block-end: 16px;
    background: var(--bg);
}

.slot-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-block-end: 10px;
    color: var(--brandtext);
}

.slot-head .link { margin-inline-start: auto; }

.fixed { margin: 6px 0 0; font-weight: 700; }

/* 文字だけのボタン（削除・取り消し） */
button.link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: var(--brandtext);
    text-decoration: underline;
    cursor: pointer;
}

.btn.small { padding: 8px 20px; font-size: 14px; margin: 0; }

/* 応募書類 */
.file-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr;
    gap: 8px 20px;
    padding-block: 14px;
    border-block-start: 1px solid var(--line);
}

.file-row .hint { margin: 2px 0 0; }
.file-name { margin-inline-end: 12px; font-weight: 700; word-break: break-all; }

input[type="file"] { font: inherit; font-size: 14px; max-inline-size: 100%; }

input[type="file"]::file-selector-button {
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--brandtext);
    background: var(--bg);
    border: 2px solid var(--btn);
    border-radius: 999px;
    padding: 6px 16px;
    margin-inline-end: 12px;
    cursor: pointer;
}

/* 確認画面・完了画面の表 */
table.confirm { margin-block: 8px 16px; }
table.confirm td.pre { white-space: pre-wrap; word-break: break-word; }

.consent ul { margin: 6px 0; }
.consent p { margin: 4px 0; }

.alert ul { margin: 8px 0 0; }

@media (max-width: 640px) {
    .file-row { grid-template-columns: 1fr; }
    .btn.small { display: inline-block; }
}

@media (max-width: 640px) {
    .hero { padding-block: 36px; }
    .hero h1 { font-size: 24px; }
    section { padding-block: 28px; }
    th { inline-size: 32%; }
    .btn { display: block; margin: 10px 0; text-align: center; }
}

@media print {
    .hero { background: none; }
    .btn { display: none; }
}
