/* ====================
   Tables Component
   テーブルの共通スタイル
   ==================== */

/* ========== テーブル基本 ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-primary);
}

/* ========== テーブルヘッダー ========== */
.table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-white);
}

.table th {
    padding: 12px 8px;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.table th:last-child {
    border-right: none;
}

/* ========== テーブルボディ ========== */
.table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color var(--transition-base);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: var(--color-gray-50);
}

.table td {
    padding: 12px 8px;
    vertical-align: middle;
    font-size: var(--font-size-sm);
}

/* ========== テキスト配置 ========== */
.table .text-left {
    text-align: left;
}

.table .text-center {
    text-align: center;
}

.table .text-right {
    text-align: right;
}

/* ========== テーブルバリエーション ========== */

/* ストライプ */
.table-striped tbody tr:nth-child(odd) {
    background-color: var(--color-gray-50);
}

/* ボーダー */
.table-bordered {
    border: 1px solid var(--color-border-light);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--color-border-light);
}

/* ホバー効果なし */
.table-no-hover tbody tr:hover {
    background-color: transparent;
}

/* コンパクト */
.table-sm th,
.table-sm td {
    padding: 8px 6px;
    font-size: var(--font-size-xs);
}

/* ゆったり */
.table-lg th,
.table-lg td {
    padding: 16px 12px;
    font-size: var(--font-size-base);
}

/* ========== レスポンシブテーブル ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    min-width: 600px;
}

/* ========== テーブルコンテナ ========== */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ========== 特殊なセル ========== */

/* アクションセル */
.table .col-action {
    min-width: 180px;
    text-align: center;
}

/* 日付セル */
.table .date-text {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

/* サブ情報 */
.table .sub-info {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* 定員表示 */
.table .capacity-text {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
}

/* 参加費 */
.table .fee-text {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    font-size: var(--font-size-base);
}

/* イベント名 */
.table .event-name {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 4px;
    font-size: var(--font-size-base);
}

/* ========== アクション行（ボタン配置） ========== */
.action-row-top {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 6px;
}

.action-row-bottom {
    display: flex;
    justify-content: center;
}

/* ========== レスポンシブ ========== */
@media (max-width: 1200px) {
    .table {
        font-size: var(--font-size-xs);
    }
    
    .table th,
    .table td {
        padding: 10px 6px;
    }
}

@media (max-width: 768px) {
    .table {
        min-width: 800px;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
        font-size: var(--font-size-xs);
    }
}