/* ------------------------------------------------------------------
 * job5.nakama.life 固有の追加スタイル。
 * styles.css は test.nakama.life のものをそのまま使い、Laravel 側で
 * 必要になった差分だけをここに置く（styles.css 本体は編集しない）。
 * ------------------------------------------------------------------ */

/* 「NAKAMAについて」モーダル */
.about-modal-panel { max-width: 640px; }
.about-modal-body { padding: 16px 20px 24px; line-height: 1.8; color: var(--text-secondary, #445166); }
.about-modal-body p + p { margin-top: 12px; }
.trademark {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: top;
  margin-left: 1px;
}
#about-modal-title .trademark {
  font-size: 0.42em;
}

/* 求人詳細：募集要項の本文は改行をそのまま表示（旧 .text_box と同じ pre-line） */
.job-spec td { white-space: pre-line; }
.job-spec td p { margin: 0; }

/* 募集終了 */
.button.is-closed, .button.is-closed:hover { background: #b9c2cc; border-color: #b9c2cc; color: #fff; cursor: not-allowed; }

/* マイページ：旧テーブル系画面（応募履歴・お気に入り）の補助 */
.portal-body .data-table td .button { white-space: nowrap; }
.portal-body .data-table tr.is-unread td:first-child { border-left: 3px solid var(--primary, #12629b); }
.portal-body .stack-form .field-note { font-size: 13px; color: var(--text-muted, #697587); margin: 4px 0 0; }

/* マイページ：履歴書フォームなど、選択肢を横並びにするグループ */
.portal-body .check-group.inline-options label { display: inline-flex; align-items: center; gap: 6px; margin: 0 18px 6px 0; }
.portal-body .other-input { margin-top: 8px; }
.portal-body .other-input[hidden] { display: none !important; }

/* PDF アップロード行（履歴書・職務経歴書） */
.document-row .document-file-name { font-size: 14px; color: var(--text-secondary, #445166); word-break: break-all; }
.document-row input[type="file"] { display: none; }

/* 応募メッセージ（選考状況）のチャット表示 */
.message-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.message-thread li { display: flex; gap: 10px; align-items: flex-start; }
.message-thread li.me { flex-direction: row-reverse; }
.message-thread .avatar { width: 36px; height: 36px; border-radius: 50%; background: #f1f4f7; flex: 0 0 36px; overflow: hidden; }
.message-thread .avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-thread .bubble { max-width: 78%; background: #f1f4f7; border-radius: 10px; padding: 10px 14px; white-space: pre-line; line-height: 1.7; }
.message-thread li.me .bubble { background: #e8f2f8; }
.message-thread .bubble h3 { margin: 0 0 4px; font-size: 15px; }
.message-thread .bubble time { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted, #697587); }
.message-thread .bubble-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }

/* 会員登録ウィザード：認証コード欄と再送ボタン */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; }
.code-row .button { white-space: nowrap; }
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-field .toggle-visibility { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 13px; color: var(--text-muted, #697587); padding: 4px 6px; }

/* layer（旧ライブラリ）のダイアログを参照サイトのトーンに寄せる */
.layui-m-layer .layui-m-layercont { font-size: 15px; line-height: 1.7; }
.layui-m-layer .layui-m-layerbtn span[yes] { color: var(--primary, #12629b); }

/* 旧 style.css を併用する画面（詳細履歴書など）は、参照サイトのシェル内で幅を広げる */
.portal-body .legacy-page .main { max-width: none; margin: 0; padding: 0; }

/* ------------------------------------------------------------------
 * 2026-09-04 求人一覧カード（ユーザー指示・スマホ表示の調整）
 * ------------------------------------------------------------------ */
/* 勤務地／雇用形態／日本語レベルは装飾なし・クリック不可 */
.job-card-facts .job-fact-chip,
.job-card-facts .job-fact-chip * {
  text-decoration: none !important;
  border-bottom: 0 !important;
  pointer-events: none;
  cursor: default;
  -webkit-touch-callout: none;
}
/* 求人更新日は常に右寄せ（facts が折り返しても右端へ） */
.job-card-foot-row .job-card-updated { margin-left: auto; }
/* スマホでは一覧下部の急募求人／人気求人ブロックを表示しない */
@media (max-width: 900px) {
  .side-promo { display: none; }
}

/* スマホ：求人タイトルは最大3行、超過分は「…」 */
@media (max-width: 900px) {
  .job-card h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* デスクトップ：検索エリア全体（キーワード＋エリア／職種／日本語／追加条件）を1枚のカードで囲む。スマホは従来どおり */
@media (min-width: 901px) {
  .search-hero {
    background: var(--color-bg, #f6f7f9);
    border-bottom: 0;
    padding: 24px 0 4px;
  }
  .search-hero > .container {
    background: #fff;
    border: 1px solid var(--color-border, #dce1e7);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(23, 35, 51, 0.04);
    padding: 24px 28px 18px;
  }
}
/* デスクトップ：外側のカード枠があるため、キーワード入力＋検索ボタンの内側の枠・影は外す */
@media (min-width: 901px) {
  .search-hero .primary-search {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
}
/* スマホ：キーワード入力＋検索ボタンの枠・影も外す（デスクトップと同様） */
@media (max-width: 900px) {
  .search-hero .primary-search {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
}
/* デスクトップ右側「急募求人／人気求人」：タイトルは最大3行、超過分は「…」 */
.side-promo-link strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 求人詳細（ユーザー指示 2026-09-04）：更新日はページ右下、スマホでは右カラムとフッターナビを出さない */
.detail-page .job-updated-bottom { text-align: right; color: var(--color-text-muted, #697587); font-size: 13px; margin: 8px 0 0; }
/* 更新日の下の余白を詰める（参照サイトは 72px）。スマホは固定の応募バーがあるため 72px のまま */
@media (min-width: 901px) { .detail-page { padding-bottom: 24px; } }
@media (max-width: 900px) {
  body[data-page="jobdetail"] .detail-side { display: none; }
  body[data-page="jobdetail"] .site-footer .footer-grid { display: none; }
  body[data-page="jobdetail"] .site-footer .footer-bottom { border-top: 0; }
}

/* フッターのナビゲーションは中央寄せ（参照サイトは右寄せ） */
.site-footer .footer-grid { justify-content: center; }

/* 求人詳細・更新日：右端に少し余白。スマホは下の余白を詰め、固定の応募バーに隠れない分はフッター側に持たせる */
.detail-page .job-updated-bottom { padding-right: 8px; }
@media (max-width: 900px) {
  body[data-page="jobdetail"] .detail-page { padding-bottom: 12px; }
  body[data-page="jobdetail"] .site-footer { padding-bottom: 64px; }
}
@media (max-width: 900px) {
  body[data-page="jobdetail"] .detail-main { padding-bottom: 0; }
  .detail-page .job-updated-bottom { padding-right: 16px; }
}

/* 退会ページ：アカウント表示は2行、各行は折り返さない */
.withdraw-account-label { margin: 0 0 4px; color: var(--color-text-muted, #697587); font-size: 13px; white-space: nowrap; }
.withdraw-account-email { margin: 0 0 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 検索ボックス：入力欄を高く、PC では「求人を検索」ボタンを入力枠の中に置く */
@media (max-width: 900px) {
  .primary-search-simple .search-keyword input { height: 48px; font-size: 15px; }
}
@media (min-width: 901px) {
  .search-hero .primary-search-simple {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 54px;
    border: 1px solid var(--color-border-strong, #b9c2cc);
    border-radius: var(--radius-control, 7px);
    background: #fff;
    overflow: hidden;
  }
  .search-hero .primary-search-simple:focus-within { box-shadow: 0 0 0 3px rgba(18, 98, 155, 0.18); }
  .search-hero .primary-search-simple .search-keyword { flex: 1 1 auto; min-width: 0; }
  .search-hero .primary-search-simple .search-keyword input {
    height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0 18px;
    font-size: 15px;
  }
  .search-hero .primary-search-simple .search-keyword input:focus { outline: none; box-shadow: none; }
  .search-hero .primary-search-simple .button-search {
    flex: 0 0 auto;
    margin: 4px;
    min-width: 140px;
    border-radius: 6px;
  }
}

/* 検索ボックスのクリア（×）ボタンにマウスを乗せたら手のカーソル */
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* 検索ボックスの独自クリアボタン（文字がある間は常時表示）。ブラウザ標準の×は隠す */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.primary-search-simple .search-keyword { position: relative; }
.primary-search-simple .search-keyword input { padding-right: 40px; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; padding: 2px 8px;
  font-size: 22px; line-height: 1; color: var(--color-text-muted, #697587); cursor: pointer;
}
.search-clear:hover { color: var(--color-text, #172333); }

/* 求人詳細：求人ID は右寄せ */
.detail-summary .job-id { text-align: right; }

/* トップページ以外のフッターは著作権表記のみ（上の罫線も無し） */
.site-footer-min .footer-bottom { border-top: 0; padding: 14px 0; }

/* ログイン画面：「または」区切り線と会員登録（赤）ボタン */
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 18px; color: var(--color-text-muted, #697587); font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--color-border, #dce1e7); }
.auth-register-btn, .auth-register-btn:hover { background: #b3261e; border-color: #b3261e; color: #fff; }
.auth-register-btn:hover { background: #9a1f18; }
.auth-card .auth-register-btn + .auth-switch { margin-top: 18px; text-align: center; }

/* コンテンツが短いページでもフッターを画面最下部に固定（スティッキーフッター） */
body:not(.portal-body) { display: flex; flex-direction: column; min-height: 100vh; }
body:not(.portal-body) > .site-footer { margin-top: auto; }

/* スマホ：本文エリアは画面端に張り付けず左右に余白を取る（参照サイトは全幅） */
@media (max-width: 600px) {
  .detail-page > .container { width: min(100% - 28px, var(--container)); }
  .detail-page .job-updated-bottom { padding-right: 8px; }
  .portal-body .business-content { width: min(100% - 28px, 1000px); padding: 18px 0 48px; }
  .portal-body .business-content > .portal-header { margin: 0 0 16px; }
}

/* スマホ：チェックボックス／ラジオは PC と同じく横並びで順番に流す（参照サイトは縦1列） */
@media (max-width: 600px) {
  .check-group label { display: inline-flex; margin-right: 14px; }
}

/* 書類（PDF）のファイル名横の × で削除 */
.document-remove {
  position: relative; display: inline-block;
  width: 24px; height: 24px; margin-left: 8px; padding: 0; border: 0; border-radius: 50%;
  background: #b3261e; color: transparent; font-size: 0; line-height: 0;
  cursor: pointer; vertical-align: middle;
}
/* × は文字ではなく2本の線で描く（円の中心に正確に置くため） */
.document-remove::before, .document-remove::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 13px; height: 2.5px; background: #fff; border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.document-remove::after { transform: translate(-50%, -50%) rotate(-45deg); }
.document-remove:hover { background: #9a1f18; }

/* 書類行の「必須」タグ（赤） */
.document-row strong .field-required-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #fbe9e7; color: #b3261e; font-size: 12px; font-weight: 700; font-style: normal; vertical-align: middle; }

/* 応募フォーム：求人名は詳細へのリンク、自己PR欄の上に余白 */
.portal-panel .detail-title-row h2 { font-size: 16px; line-height: 1.6; }
.portal-panel .detail-title-row h2 a { color: var(--color-primary, #12629b); text-decoration: none; }
.portal-panel .detail-title-row h2 a:hover { color: var(--color-primary-hover, #0b4f80); text-decoration: underline; }
.apply-note-field { margin-top: 18px; }

/* スマホ固定バーの「お気に入り」も、登録済みは PC と同じ赤系の表示 */
.mobile-sticky-apply [data-favorite-btn][aria-pressed="true"] {
  border-color: var(--color-danger, #b3261e);
  background: var(--color-danger-soft, #fbe9e7);
  color: var(--color-danger, #b3261e);
}

/* 求人詳細：応募済み（灰色・押せない） */
.button.is-applied, .button.is-applied:hover { background: #b9c2cc; border-color: #b9c2cc; color: #fff; cursor: not-allowed; }

/* 応募履歴一覧 */
.application-meta { font-size: 12px; color: var(--color-text-muted, #697587); margin: 0 0 4px; }
.application-title { font-weight: 600; }
.only-mobile { display: none; }
@media (max-width: 600px) {
  .only-mobile { display: block; margin: 6px 0 0; }
  .portal-body .business-content .data-table-wrap { margin: 0; }
  .portal-body .application-table { min-width: 0; font-size: 14px; }
  .portal-body .application-table td { padding: 12px 10px; vertical-align: top; }
  .portal-body .application-table { font-size: 13px; }
  .portal-body .application-table td { white-space: normal; word-break: break-word; }
}
.application-status { margin: 6px 0 0; }
.application-status a { color: var(--color-text-muted, #697587); font-weight: 400; }

/* お気に入り：応募履歴と同じ見た目（求人ID＋14pxのタイトル） */
.application-card .application-cell { font-size: 14px; }
.application-card .application-title { display: block; line-height: 1.6; }

/* スマホ：検索条件チップは横スクロールではなく折り返す（参照サイトは横スクロール） */
@media (max-width: 600px) {
  .active-filters { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
  .active-filters > a { white-space: nowrap; }
  .results { min-width: 0; }
}

/* ヘッダー：ロゴとログインボタンの間にスローガンを表示（狭い画面では省略） */
.site-slogan {
  flex: 1;
  margin: 0;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.site-slogan-inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 6px 14px;
}
.site-slogan-inner::before {
  content: "";
  position: absolute;
  inset: -6px -10px;
  background: radial-gradient(ellipse at center, rgba(18, 98, 155, 0.09), rgba(173, 40, 49, 0.05) 60%, transparent 78%);
  filter: blur(7px);
  z-index: 0;
  pointer-events: none;
}
.site-slogan-text {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-width: 100%;
  color: #1c2c45;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 3px rgba(23, 35, 51, 0.18);
}
@media (max-width: 900px) {
  .site-slogan { display: none; }
}
