/* 
 * デスクトップ版テーブルコンポーネント
 * BEM命名規則に基づくテーブル構造
 */

/* Block: 基本テーブル */
.table {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border-collapse: collapse;
    border-spacing: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: white;
}

/* Element: テーブルヘッダー */
.table__header {
    background-color: #f5f5f5;
    color: #333;
    font-weight: bold;
}

/* Element: テーブルロウ */
.table__row {
    border-bottom: 1px solid #eee;
}

.table__row:last-child {
    border-bottom: none;
}

/* Element: テーブルセル */
.table__cell {
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}

/* Element: テーブルヘッダーセル */
.table__header-cell {
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
    font-weight: bold;
}

/* Element: テーブルキャプション */
.table__caption {
    margin-bottom: 10px;
    font-weight: bold;
    text-align: left;
    caption-side: top;
}

/* Modifier: ボーダー付きテーブル */
.table--bordered {
    border: 1px solid #ddd;
}

.table--bordered .table__cell,
.table--bordered .table__header-cell {
    border: 1px solid #ddd;
}

/* Modifier: 縦線ナシテーブル */
.table--borderless-vertical .table__cell,
.table--borderless-vertical .table__header-cell {
    border-left: none;
    border-right: none;
}

/* Modifier: 交互ストライプテーブル */
.table--striped .table__row:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Modifier: ホバーエフェクトテーブル */
.table--hover .table__row:hover {
    background-color: #f5f5f5;
}

/* Modifier: コンパクトテーブル */
.table--compact .table__cell,
.table--compact .table__header-cell {
    padding: 8px 10px;
}

/* Modifier: センター寄せテーブル */
.table--centered {
    margin-left: auto;
    margin-right: auto;
}

.table--centered .table__cell,
.table--centered .table__header-cell {
    text-align: center;
}

/* Modifier: セル内容の展開テーブル */
.table--expandable .table__cell--expandable {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s;
}

.table--expandable .table__cell--expanded {
    white-space: normal;
    overflow: visible;
}

/* 
 * レガシーコード互換部分
 * 既存のコードとの互換性を保つための非BEMセレクタ
 */

/* ナレッジテーブル互換性 */
.tr-line {
    /* .table__row と同等 */
    border-bottom: 1px solid #eee;
    margin: 15px 0;
}

.td-data-wrap {
    /* .table__cell と同等 */
    padding: 10px 0;
    text-align: left;
    vertical-align: middle;
}

/* 会社概要テーブル互換性 */
.company-info-table {
    /* .table と同等 */
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: collapse;
    border-spacing: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: white;
}

.company-info-table td {
    /* .table__cell と同等 */
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.td-title {
    /* .table__header-cell と同等 */
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
    font-weight: bold;
    width: 30%;
    min-width: 120px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
}

/* コンタクトテーブル互換性 */
.contact-table {
    /* .table.table--centered と同等 */
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: collapse;
    border-spacing: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: white;
}

.contact-table td {
    /* .table__cell と同等 */
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.contact-value-center {
    /* センター寄せセルの互換性 */
    text-align: center !important;
}