/*
 * Member-side theme override
 * Overrides color values that are hardcoded (not var() based) in shared CSS
 * (adminlte.min.css, styles.css) so that member-side pages pick up member tokens
 * without editing those shared files (which are also used by company/support).
 *
 * All rules must reference tokens from theme-tokens.css.
 * This file must load LAST in member/layouts/css.blade.php.
 */

/* ---------- Shared styles.css overrides (member scope only) ---------- */

.navbar-header {
    color: var(--member-primary-text);
}

.btn-logout {
    background-color: var(--member-primary);
    color: var(--member-primary-ink);
}

.btn-logout:hover {
    color: var(--member-primary-text);
    border: 1px solid var(--member-primary);
}

/* ---------- Bootstrap / AdminLTE primary utility overrides ---------- */
/* These classes are baked with #00a3d9 in adminlte.min.css. Re-point them at the member token. */

.btn-primary,
.bg-primary,
.navbar-primary,
.sidebar-primary {
    background-color: var(--member-primary) !important;
    border-color: var(--member-primary) !important;
    color: var(--member-primary-ink) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background-color: var(--member-primary-hover) !important;
    border-color: var(--member-primary-hover) !important;
    color: #fff !important;
}

/* Outline button: text and border must stay readable on white.
   --member-primary (#ff8c00) only gives 2.33:1, so use --member-primary-text (5.02:1). */
.btn-outline-primary {
    color: var(--member-primary-text) !important;
    border-color: var(--member-primary-text) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    color: var(--member-primary-ink) !important;
    background-color: var(--member-primary) !important;
    border-color: var(--member-primary) !important;
}

.text-primary {
    color: var(--member-primary-text) !important;
}

/* Informational borders need 3:1 vs adjacent surface (WCAG 1.4.11).
   --member-primary (#ff8c00) on white is 2.33:1; use the darker text token. */
.border-primary {
    border-color: var(--member-primary-text) !important;
}

.badge-primary {
    background-color: var(--member-primary);
    color: var(--member-primary-ink);
}

.alert-primary {
    color: var(--member-primary-hover);
    background-color: var(--member-primary-soft);
    border-color: var(--member-primary-accent);
}

.list-group-item-primary {
    color: var(--member-primary-hover);
    background-color: var(--member-primary-soft);
}

/* Pagination */
.page-link {
    color: var(--member-primary-text);
}

.page-link:hover,
.page-link:focus {
    color: var(--member-primary-hover);
}

.page-item.active .page-link {
    background-color: var(--member-primary);
    border-color: var(--member-primary);
    color: var(--member-primary-ink);
}

/* Form focus ring — must be ≥3:1 vs surrounding white (WCAG 2.4.13 Focus Appearance).
   --member-primary-accent (#ffb14a) is 1.80:1 (fails). Use --member-primary-hover (7.64:1).
   Outer glow stays in the keycolor for brand continuity. */
.form-control:focus,
.custom-select:focus {
    border-color: var(--member-primary-hover);
    box-shadow: 0 0 0 0.2rem rgba(var(--member-primary-rgb), 0.35);
}

/* Links */
a {
    color: var(--member-primary-text);
}

a:hover {
    color: var(--member-primary-hover);
}

/* ---------- Theme-specific rigament logo background ---------- */
/* top-main.css .banner-title-logo references the orange path by default;
   these rules override for coral/saffron. */
html[data-theme="coral"] .banner-title-logo {
    background-image: url('../../images/member-theme/coral/rigament_logo_01.svg');
}
html[data-theme="saffron"] .banner-title-logo {
    background-image: url('../../images/member-theme/saffron/rigament_logo_01.svg');
}

/* ---------- Accessibility: footer font-size buttons ----------
   footer の文字サイズ切替は button 化したが、既存の .circle デザインを維持するため
   button のデフォルトスタイル（背景・余白）のみリセット。 */
button.circle {
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
}
button.circle:focus-visible {
    outline: 2px solid var(--member-primary);
    outline-offset: 2px;
}

/* ---------- Accessibility: skip link ---------- */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1080;
    padding: 0.5rem 1rem;
    background-color: var(--member-primary);
    color: var(--member-primary-ink);
    text-decoration: none;
}
.skip-link:focus {
    outline: 2px solid var(--member-primary-ink);
    outline-offset: 2px;
}

/* ---------- Accessibility: WCAG AA contrast fixes (2026-04-22) ----------
   Playwright+axe 解析で、--member-primary を直接「文字色」または
   「白文字の背景」として使っていた箇所で 2.09〜3.61:1 のコントラスト
   不足が検出された（AA 基準 4.5:1 未達）。theme-tokens.css に既に
   定義されている専用トークン（-text / -ink / -hover）を使う形へ是正。

   * --member-primary-text  (#b45309 orange) = 5.02:1 vs white  → 文字用
   * --member-primary-hover (#8a3d00 orange) = 7.64:1 vs white  → 濃色文字
   * --member-primary-ink   (#1a1a1a)        = 高コントラスト   → primary 塗り上の文字
*/

/* Pattern A: soft 背景に白文字 → 濃色文字へ */
.banner-title-1 {
    color: var(--member-primary-hover);
}

/* Pattern B: primary 塗り背景の上に白/黄文字 → 黒系 ink へ */
.jobs-number-note-second,
.jobs-number-num,
.jobs-number-num-main,
.jobs-number-note-second-sp,
.jobs-number-num-main-sp,
.label-search,
.label-search-sp,
.new-job-btn,
.tab-label .nav-link.active {
    color: var(--member-primary-ink) !important;
}

/* Pattern C: 白背景に primary 文字 → primary-text へ */
.btn-input-search,
.btn-input-search-sp,
.select-prefecture,
.select-occupation,
.new-job-status,
.new-job-btn:hover,
.new-job-btn:active,
.btn-more-news,
.news-time {
    color: var(--member-primary-text) !important;
}
.new-job-status {
    border-color: var(--member-primary-text);
}
.new-job-btn:hover,
.new-job-btn:active,
.btn-more-news {
    border-color: var(--member-primary-text);
}

/* Pattern B 追加: card-red 内の白文字 → ink */
.card-red .title,
.card-red .description {
    color: var(--member-primary-ink) !important;
}

/* 最後のフローカードは次に続くものがないため矢印（::after の ▶）を非表示 */
.box-3 .row-cols-lg-4 > .col:last-child .custom-card::after {
    display: none !important;
}

/* Pattern D: footer の背景を各テーマの --member-primary に維持
   テキストを白から ink に切り替えることで AA を確保:
     - orange  #ff8c00 × ink = 7.46:1 AAA
     - coral   #e55934 × ink = 4.82:1 AA
     - saffron #d97706 × ink = 5.46:1 AA
   opacity を持つ親要素（footer-about .content-1 / .content-2 /
   footer-links .nav 等）も 1 に戻して alpha 合成による見かけ薄化を防ぐ。 */
footer .footer-about .content-1,
footer .footer-about .content-2,
footer .footer-copy,
footer .footer-links .nav,
footer .footer-links .nav-link,
footer .content-1,
footer .content-2 {
    opacity: 1 !important;
}
footer,
footer .title,
footer .description,
footer p,
footer span,
footer a,
footer .nav-link,
footer .footer-btn,
footer .phone-number,
footer .footer-copy p,
footer .text-body-secondary {
    color: var(--member-primary-ink) !important;
    opacity: 1 !important;
}
/* footer-btn の枠線も ink に（元は白枠で背景アンバーに対して 1.75:1） */
footer .footer-btn {
    border-color: var(--member-primary-ink) !important;
}
/* 登録ボタン（.register.footer-btn）の背景が accent カラー（薄オレンジ）で
   白文字だった。アンバー背景の footer 内では透明地 + ink 文字 + ink 枠へ */
footer .register.footer-btn {
    background-color: transparent !important;
    border-color: var(--member-primary-ink) !important;
    color: var(--member-primary-ink) !important;
}
