/* ==========================================================================
   労災報告 機能専用スタイルシート
   Figma: SP_労災報告ページ (Node 184:1185) & SP_労災報告完了ページ (Node 184:2225) 準拠
   ========================================================================== */

:root {
    --theme-primary: #702d7f;
    --theme-primary-hover: #4a1555;
    --theme-primary-light: rgba(112, 45, 127, 0.15);
}

/* 建設業選択時の緑配色 */
body.theme-kensetsu,
.theme-kensetsu {
    --theme-primary: #019178;
    --theme-primary-hover: #00735f;
    --theme-primary-light: rgba(1, 145, 120, 0.15);
}

body {
    background-color: #ffffff !important;
}

/* 画面幅の制御（トップページおよび他ページと統一） */
.mypage-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 80vh;
    box-sizing: border-box;
}

/* ==========================================================================
   共通ヘッダー情報・戻るリンク・タイトル帯 統一スタイル
   ========================================================================== */

/* 会員情報バー */
.member-header-info {
    background-color: #ffffff;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    box-sizing: border-box;
}

/* 会員番号行 */
.member-header-info .member-no-row,
.member-header-info .small,
.member-header-info .card-reissue-member-no,
.member-header-info .health-check-member-no,
.member-header-info .editinfo_title_no_dairi {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    line-height: 1.4;
    min-height: 1.4em;
    margin: 0 0 4px 0;
    padding: 0;
}

.member-header-info .member-no-val,
.member-header-info .top-member-no,
.member-header-info .top-company-no,
.member-header-info #title_no {
    font-weight: 700;
    color: #666666;
}

.member-header-info .member-no-row.is-invisible-no {
    visibility: hidden;
}

/* 氏名行 */
.member-header-info .member-name-heading,
.member-header-info .card-reissue-member-name,
.member-header-info .health-check-member-name,
.member-header-info .editinfo_title_name,
.member-header-info .editinfo_title_name_dairi,
.member-header-info .h4 {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}

.member-header-info .member-name-val,
.member-header-info .top-member-name,
.member-header-info .top-company-name,
.member-header-info #title_name {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
}

.member-header-info .member-honorific {
    font-size: 18px;
    font-weight: 500;
    color: #333333;
    margin-left: 4px;
}

/* 戻るナビゲーションバー */
.back-nav-bar,
.back-to-hub-bar {
    padding: 8px 20px 10px;
    background-color: #ffffff;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
}

/* 戻るリンク */
.back-nav-link,
.btn-back-to-hub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--theme-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.back-nav-link:hover,
.btn-back-to-hub:hover {
    color: var(--theme-primary-hover);
    text-decoration: underline;
}

.back-nav-link i,
.btn-back-to-hub i {
    font-size: 12px;
    line-height: 1;
}

/* 戻り先がない画面用の不可視ナビゲーション（スペースと高さを維持） */
.back-nav-bar.is-invisible-nav .back-nav-link,
.back-nav-bar .back-nav-link.is-invisible-link {
    visibility: hidden;
    pointer-events: none;
}

/* タイトル見出し帯（基本は紫、建設業選択時は緑に変数が自動連動） */
.page-title-banner,
.menu-header,
.card-reissue-title-banner,
.accident-report-title-banner,
.health-check-title-banner,
.withdrawal-title-banner {
    background-color: var(--theme-primary);
    color: #ffffff;
    padding: 14px 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin: 0 0 20px 0;
}

.page-title-banner h1,
.page-title-banner h2,
.page-title-banner .menu-title,
.menu-header h1,
.menu-header h2,
.menu-header .menu-title,
.menu-header .union-page-title,
.accident-report-title-banner h1,
.card-reissue-title-banner h1,
.health-check-title-banner h1 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* メインコンテンツ領域 */
.accident-report-content {
    flex: 1;
    padding: 24px 16px 48px;
}

/* フォームグループ */
.accident-report-form-group {
    margin-bottom: 24px;
}

.accident-report-form-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 9px;
    line-height: 1.4;
}

.accident-report-form-label .required-badge {
    background-color: #ff4d4f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* 入力例テキスト（枠の上に1行で収まるサイズ） */
.accident-report-example-text {
    font-size: 13px;
    font-weight: 500;
    color: #666666;
    margin-top: -2px;
    margin-bottom: 7px;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

@media (max-width: 480px) {
    .accident-report-example-text {
        font-size: calc(9px + 0.8vw);
        letter-spacing: -0.02em;
    }
}

@media (max-width: 360px) {
    .accident-report-example-text {
        font-size: 10.5px;
        letter-spacing: -0.03em;
    }
}

@supports (font-size: 1cqw) {
    .mypage-container {
        container-type: inline-size;
    }
    .accident-report-example-text {
        font-size: clamp(10.5px, 2.75cqw, 13px);
        letter-spacing: -0.015em;
    }
}

/* 1行入力コントロール（外枠: Figma枠線 #707070, 角丸 5px） */
.accident-report-input-wrap {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #707070;
    border-radius: 5px;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 54px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.accident-report-input-wrap:focus-within {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}

.accident-report-input-wrap.has-error {
    border-color: #e53935;
    background-color: #fff9f9;
}

/* 複数行テキストエリア外枠（ラッパー） */
.accident-report-textarea-wrap {
    position: relative;
    width: 100%;
}

/* 入力フィールド */
.accident-report-control {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 16px;
    font-size: 16px;
    color: #333333;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.accident-report-control::placeholder {
    color: #707070;
    font-size: 15px;
    opacity: 0.8;
}

/* テキストエリア本体（枠線・背景・パディングを直接適用し、リサイズハンドルを右下端に配置） */
textarea.accident-report-control {
    width: 100%;
    min-height: 120px;
    height: 120px;
    background-color: #ffffff;
    border: 1px solid #707070;
    border-radius: 5px;
    padding: 12px 16px;
    resize: vertical;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
}

textarea.accident-report-control:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}

.accident-report-textarea-wrap.has-error textarea.accident-report-control {
    border-color: #e53935;
    background-color: #fff9f9;
}

/* カレンダーアイコン・時計アイコン付き日付・日時・時刻入力 */
.accident-report-date-wrap .calendar-icon,
.accident-report-datetime-wrap .calendar-icon,
.accident-report-time-wrap .clock-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--theme-primary);
    font-size: 18px;
}

.accident-report-date-wrap input[type="date"],
.accident-report-datetime-wrap input[type="datetime-local"],
.accident-report-time-wrap input[type="time"] {
    padding-left: 46px;
    cursor: pointer;
}

/* 日付・時刻の横並びレイアウト */
.accident-report-datetime-flex {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.accident-report-datetime-col {
    min-width: 0;
}

.accident-report-date-col {
    flex: 1.4;
}

.accident-report-time-col {
    flex: 1;
}

.accident-report-datetime-flex .accident-report-time-wrap {
    margin-top: 0;
}

.accident-report-sub-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666666;
    margin-bottom: 6px;
    line-height: 1.2;
}

@media (max-width: 360px) {
    .accident-report-datetime-flex {
        flex-direction: column;
        gap: 10px;
    }
    .accident-report-date-col,
    .accident-report-time-col {
        width: 100%;
        flex: none;
    }
}

/* 分割セレクトボックス (□ 年 □ 月 □ 日 / □ 時 □ 分) */
.accident-report-datetime-row {
    width: 100%;
}

.split-date-container,
.split-time-container {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.split-select-wrap {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #707070;
    border-radius: 5px;
    height: 52px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.split-year-wrap {
    flex: 1.35;
}

.split-month-wrap {
    flex: 1;
}

.split-day-wrap {
    flex: 1;
}

.split-hour-wrap,
.split-minute-wrap {
    flex: 1;
}

.split-select-wrap:focus-within {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}

.split-select-wrap.has-error {
    border-color: #e53935;
    background-color: #fff9f9;
}

.split-select-control {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 24px 0 10px;
    font-size: 15px;
    color: #333333;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
    box-sizing: border-box;
    font-family: inherit;
}

.select-arrow-split {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #707070;
    font-size: 11px;
}

.split-unit-text {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    white-space: nowrap;
    padding: 0 2px;
    flex-shrink: 0;
}

/* 2択ボタン（「はい」「いいえ」 / Figma Node 184:1347 準拠） */
.accident-report-choice-group {
    display: flex;
    gap: 9px;
    align-items: center;
}

.accident-report-choice-btn {
    flex: 1;
    height: 55px;
    background-color: #ffffff;
    border: 1.5px solid transparent;
    border-radius: 5px;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    outline: none;
}

.accident-report-choice-btn:hover {
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
}

/* 選択された状態 */
.accident-report-choice-btn.is-active {
    background-color: var(--theme-primary);
    color: #ffffff;
    border-color: var(--theme-primary);
    box-shadow: 0px 2px 6px var(--theme-primary-light);
}

.accident-report-choice-btn.has-error {
    border-color: #e53935;
}

/* エラーメッセージ */
.accident-report-error-msg {
    font-size: 12px;
    color: #e53935;
    margin-top: 6px;
    display: none;
}

/* 病院へ「労災です」とお伝えください アラート (Figma Node 184:2632 準拠) */
.accident-report-alert-hospital {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #cc0c39;
    font-size: 14px;
    font-weight: 700;
}

.accident-report-alert-hospital .accident-report-alert-icon {
    color: #cc0c39;
    font-size: 16px;
}

/* 休業詳細セクション (Figma Node 184:2654, 184:2679 準拠) */
.accident-report-absence-section {
    margin-top: 0;
}

.accident-report-note-text {
    font-size: 14px;
    color: #333333;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.5;
}

/* 送信ボタンエリア (Figma Node 184:1301 準拠: #ffca00, 角丸23px) */
.accident-report-submit-area {
    margin-top: 36px;
    text-align: center;
}

.accident-report-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    line-height: 48px;
    background-color: #ffca00;
    color: #333333;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
}

.accident-report-btn-submit:hover {
    background-color: #f0be00;
    color: #333333;
    text-decoration: none;
}

.accident-report-btn-submit:active {
    transform: scale(0.99);
}

.accident-report-btn-submit:disabled {
    background-color: #e0e0e0;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================================
   受付完了画面 (accident_report_done.php / Figma Node 184:2225 準拠)
   ========================================================================== */

.accident-report-done-content {
    background-color: #ffffff;
    padding: 40px 20px 56px;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.accident-report-done-title {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    line-height: 1.4;
    margin: 0 0 24px 0;
    text-align: center;
}

/* 完了サークルチェックアイコン */
.accident-report-done-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accident-report-done-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* お礼メッセージ / リード文 (ボックス自体を左右中央配置、内部は左揃え、幅はテキスト長に自動調整) */
.accident-report-done-message,
.accident-report-done-lead {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 28px;
    font-size: 15px;
    color: #333333;
    line-height: 1.7;
    text-align: left;
}

.accident-report-done-message p,
.accident-report-done-lead p {
    margin: 0 0 4px 0;
}

.accident-report-done-message p:last-child,
.accident-report-done-lead p:last-child {
    margin-bottom: 0;
}

/* ＜今後の流れについて＞ 案内枠 */
.accident-report-done-guide-box {
    background-color: #f0f2f2;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: left;
    margin-bottom: 32px;
    box-sizing: border-box;
}

.accident-report-done-guide-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    text-align: left;
}

.accident-report-done-guide-desc {
    font-size: 15px;
    color: #333333;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

/* 労災ケア+ 加入中案内カード (Figma Node 184:2459 準拠) */
.accident-report-care-plus-box {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.accident-report-care-plus-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    line-height: 1.5;
    margin-bottom: 6px;
    text-align: center;
}

.accident-report-care-plus-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.accident-report-done-user-email {
    font-weight: 700;
    word-break: break-all;
    color: var(--theme-primary, #702d7f);
}

/* 戻るボタンエリア */
.accident-report-submit-area {
    margin-top: 0;
    text-align: center;
}

/* 戻るボタン */
.accident-report-btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background-color: #ffca00;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.accident-report-btn-back:hover {
    background-color: #e6b600;
    text-decoration: none;
    color: #111111;
}