/* ========================================
   イベント一覧 テーブル形式（テニスベア風）
   ======================================== */

.event-table-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 20px auto;
    padding: 0 var(--spacing-lg) calc(var(--spacing-2xl) + 30px);
    box-sizing: border-box;
}

.event-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-table thead {
    color: white;
}

.event-table thead th {
    background: #FF69B4;
    padding: 14px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.event-table tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

.event-table tbody tr:hover {
    background-color: #fff5f8;
}

.event-table tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    font-size: 13px;
    border-bottom: 1px solid #bbb;
}

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

/* 主催者列 */
.event-table .host-cell {
    width: 140px;
    text-align: center;
}

.event-table .host-cell a {
    display: flex;
    flex-direction: row;  /* PC: 横並び */
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.host-avatar-table {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.host-name-table {
    font-size: 11px;
    color: #000;
    font-weight: 600;
    text-align: left;
    word-break: break-all;
    line-height: 1.3;
    max-width: 50px;
}

/* 日時列 */
.event-table .datetime-cell {
    width: 110px;
    white-space: nowrap;
}

.event-date-table {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.event-time-table {
    color: #666;
    font-size: 12px;
    display: block;
}

/* イベント情報列 */
.event-table .info-cell {
    min-width: 250px;
}

.event-title-table {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
    display: block;
}

.event-location-table {
    color: #666;
    font-size: 12px;
    display: block;
}

/* レベル列 */
.event-table .level-cell {
    width: 100px;
    text-align: center;
}

.level-badge-table {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #fce4ec;
    color: #c2185b;
    white-space: nowrap;
}

/* 参加状況列 */
.event-table .participants-cell {
    width: 70px;
    text-align: center;
}

.participants-count-table {
    font-weight: 600;
    color: #FF69B4;
    font-size: 13px;
}

/* 料金列 */
.event-table .price-cell {
    width: 80px;
    text-align: right;
    font-weight: 700;
    color: #d81b60;
    font-size: 15px;
}

/* 操作列（主催イベント用） */
.event-table .action-cell {
    width: 80px;
    text-align: center;
}

.action-btn-table {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.edit-btn-table {
    background: #4CAF50;
    color: white;
}

.edit-btn-table:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* ステータス列（参加イベント用） */
.event-table .status-cell {
    width: 110px;
    text-align: center;
    font-size: 12px;
}

.btn-cancel-event {
    margin-top: 6px;
    display: inline-block;
    padding: 4px 10px;
    border: 1.5px solid #f44336;
    border-radius: 6px;
    background: #fff;
    color: #f44336;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cancel-event:hover {
    background: #f44336;
    color: #fff;
}
.btn-cancel-event:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-pending-table {
    background: #fff3e0;
    color: #f57c00;
}

.status-approved-table {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ウォッチリスト操作列 */
.event-table .watch-cell {
    width: 50px;
    text-align: center;
}

.watch-btn-table {
    display: inline-block;
    background: white;
    border: 2px solid #ff9800;
    color: #ff9800;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 4px;
}

.watch-btn-table:hover {
    background: #fff3e0;
}

.watch-btn-table.active {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.apply-btn-table {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: #4caf50;
    color: white;
    border: none;
}

.apply-btn-table:hover {
    background: #45a049;
    transform: scale(1.05);
}

.apply-btn-table.pending {
    background: #ff9800;
}

.apply-btn-table.approved {
    background: #2e7d32;
    cursor: default;
}

/* ステータスバッジ */
.status-badge-table {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.status-recruiting {
    background: #FF69B4;
    color: white;
}

.status-full {
    background: #999;
    color: white;
}

.status-past {
    background: #e0e0e0;
    color: #999;
}

.status-cancelled {
    background: #c62828;
    color: white;
}

/* 開催済みイベント */
.event-table tbody tr.past-event {
    opacity: 0.6;
}

.event-table tbody tr.past-event:hover {
    background-color: #fafafa;
}

/* ソフトテニスタグ */
.soft-tennis-tag-table {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

/* 空状態 */
.no-events-table {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

/* レスポンシブ対応 - スマホ（横スクロール） */
@media (max-width: 768px) {
    .event-table-container {
        padding: 0 var(--spacing-lg) 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .event-table {
        font-size: 11px;
        min-width: 750px;
    }

    .event-table thead th {
        padding: 10px 6px;
        font-size: 11px;
    }

    .event-table tbody td {
        padding: 10px 6px;
        font-size: 11px;
    }

    /* ここを追加・修正 */
    .event-table tbody td.info-cell {
        width: 130px;
        max-width: 130px;
    }

    .event-table thead th:nth-child(4),
    .event-table tbody td:nth-child(4) {
        width: 60px;
        max-width: 60px;
    }

    .event-table thead th:nth-child(5),
    .event-table tbody td:nth-child(5) {
        width: 45px;
        max-width: 45px;
    }

    .event-table thead th:nth-child(6),
    .event-table tbody td:nth-child(6) {
        width: 55px;
        max-width: 55px;
    }

    /* スマホでは主催者セルを縦並びに */
    .event-table .host-cell {
        width: 70px;
    }

    .event-table .host-cell a {
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .host-avatar-table {
        width: 35px;
        height: 35px;
        margin-right: 0;
    }

    .host-name-table {
        text-align: center;
        max-width: 70px;
        font-size: 10px;
    }

    /* 列幅を調整 */
    .event-table .datetime-cell {
        width: 70px;
    }

    .event-table .info-cell {
        width: 130px;
        max-width: 130px;
    }

    .event-table .level-cell {
        width: 60px;
    }

    .event-table .participants-cell {
        width: 45px;
    }

    .event-table .price-cell {
        width: 55px;
        font-size: 13px;
    }

    .event-date-table {
        font-size: 11px;
    }

    .event-time-table {
        font-size: 10px;
    }

    .event-title-table {
        font-size: 12px;
    }

    .event-location-table {
        font-size: 10px;
    }

    .level-badge-table {
        font-size: 10px;
        padding: 3px 8px;
    }

    .participants-count-table {
        font-size: 11px;
    }

    .status-badge-table {
        font-size: 9px;
        padding: 2px 6px;
    }

    .event-table .action-cell {
        width: 70px;
    }

    .event-table .status-cell {
        width: 90px;
    }

    .event-table .watch-cell {
        width: 50px;
    }
}
