/* ========================================
   status/show.blade.php 固有スタイル
   共通スタイルは app.css に集約済み
   ======================================== */

/* status ページは内容に合わせて列幅を自動決定する */
.cross-highlight {
    table-layout: auto;
}

/* セル共通: 固定幅を解除し、余白を確保 */
.cross-highlight td,
.cross-highlight th {
    text-align: center;
    white-space: nowrap;
    padding: 8px 12px;
    width: auto;
    max-width: none;
}

/* モード列 (2列目)・マシン列 (4列目)・ライダー列 (5列目) は左寄せ */
.cross-highlight td:nth-child(2),
.cross-highlight td:nth-child(4),
.cross-highlight td:nth-child(5) {
    text-align: left;
}

/* ========================================
   承認ステータス行の背景色
   ======================================== */
.pending {
    background-color: #172c72;
}

.rejected {
    background-color: #723030;
}

/* ========================================
   拒否理由の「詳細」リンク
   ======================================== */
.reason-link {
    color: #cfcfcf;
    text-decoration: underline;
    cursor: pointer;
}

.reason-link:hover {
    color: #fff;
}

/* ========================================
   拒否理由ダイアログ (HTML5 <dialog>)
   ======================================== */
.reason-dialog {
    background-color: #1a1a2e;
    color: #cfcfcf;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 560px;
    width: calc(100% - 32px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.reason-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

.reason-dialog h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: #fff;
}

.reason-dialog .reason-body {
    margin: 0 0 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.reason-close-btn {
    background-color: #3a3a5a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 6px 18px;
    cursor: pointer;
    font-size: 0.95rem;
}

.reason-close-btn:hover {
    background-color: #50507a;
}

/* スマートフォン: 承認状況は多列・1 行表示。マトリクス用の固定列幅（app.css）の対象外にする */
@media (max-width: 768px) {
    .history-section .table-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .status-approval-table.cross-highlight {
        table-layout: auto !important;
        width: max-content !important;
        max-width: none;
    }

    .status-approval-table.cross-highlight td,
    .status-approval-table.cross-highlight th {
        width: auto !important;
        max-width: none !important;
        min-width: 0;
        white-space: nowrap;
        padding: 5px 8px;
        word-break: normal;
        overflow-wrap: normal;
    }
}
