/**
 * TeamTop.tpl 専用CSS
 * チーム情報ポータルページのスタイル
 * 2026-02-02 作成（インラインスタイルから移行）
 */

/* ===========================================
   チームヘッダー
   =========================================== */
.team-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.team-header h1 {
    font-size: 1.8rem;
    margin: 0 0 12px 0;
}

.team-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.95rem;
    color: #b0b0b0;
}

.team-header-actions {
    margin-top: 16px;
}

.team-header .btn-primary {
    display: inline-block;
    padding: 8px 16px;
    background: #4a9eff;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.team-header .btn-primary:hover {
    background: #3a8eef;
}

/* ===========================================
   セクション共通
   =========================================== */
.team-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-section .section-title {
    font-size: 1.3rem;
    border-bottom: 2px solid #1a1a2e;
    padding-bottom: 8px;
    margin: 0 0 16px 0;
}

.team-section .section-title .count {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.subsection-title {
    font-size: 1rem;
    color: #333;
    margin: 16px 0 12px 0;
    padding-left: 12px;
    border-left: 4px solid #4a9eff;
}

.subsection-title.mt-large {
    margin-top: 24px;
}

.subsection-title .count {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

/* サブセクション色バリエーション */
.subsection-title.color-red { border-left-color: #e74c3c; }
.subsection-title.color-orange { border-left-color: #f39c12; }
.subsection-title.color-blue { border-left-color: #3498db; }
.subsection-title.color-gray { border-left-color: #95a5a6; }
.subsection-title.color-green { border-left-color: #27ae60; }
.subsection-title.color-purple { border-left-color: #9b59b6; }

/* ===========================================
   テーブル共通
   =========================================== */
.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.team-table.compact {
    font-size: 0.9rem;
}

.team-table.extra-compact {
    font-size: 0.8rem;
}

.team-table thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

.team-table th {
    padding: 8px;
    text-align: left;
}

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

.team-table th.nowrap {
    white-space: nowrap;
}

.team-table th.w-60 {
    width: 60px;
}

/* ドラフト候補選手テーブル用の列幅 */
.team-table.candidates th:nth-child(1) { width: 70px; }  /* ランク */
.team-table.candidates th:nth-child(3) { width: 50px; }  /* 学年 */
.team-table.candidates th:nth-child(4) { width: 100px; } /* ポジション */
.team-table.candidates th:nth-child(5) { width: 55px; }  /* 投/打 */
.team-table.candidates th:nth-child(6) { width: 85px; }  /* 身長/体重 */

/* 進路実績テーブル用の列幅 */
.team-table.career th:nth-child(2) { width: 60px; }  /* 人数 */

.team-table tbody tr {
    border-bottom: 1px solid #eee;
}

.team-table td {
    padding: 8px;
}

.team-table td.compact {
    padding: 6px 4px;
}

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

.team-table td.bold {
    font-weight: bold;
}

.team-table td.muted {
    color: #666;
    font-size: 0.9rem;
}

.team-table td.muted-small {
    color: #666;
    font-size: 0.85rem;
}

.team-table td.nowrap {
    white-space: nowrap;
}

.team-table td.highlight-blue {
    color: #4a9eff;
}

/* ===========================================
   リンクスタイル
   =========================================== */
.player-link {
    color: #333;
    text-decoration: none;
}

.player-link:hover {
    color: #4a9eff;
}

a.team-link-green {
    color: #27ae60 !important;
    text-decoration: none;
}

a.team-link-green:hover {
    text-decoration: underline;
}

a.team-link-purple {
    color: #9b59b6 !important;
    text-decoration: none;
}

a.team-link-purple:hover {
    text-decoration: underline;
}

.more-link {
    color: #4a9eff;
    text-decoration: none;
}

.more-link:hover {
    text-decoration: underline;
}

/* ===========================================
   バッジ
   =========================================== */
.draft-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
}

.draft-badge.direct {
    background: #e74c3c;
}

.draft-badge.ob {
    background: #95a5a6;
}

.ob-badge {
    background: #95a5a6;
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 4px;
}

/* ===========================================
   スクロール可能コンテナ
   =========================================== */
.scrollable-container {
    max-height: 600px;
    overflow-y: auto;
}

.scrollable-container.medium {
    max-height: 400px;
}

.scrollable-container.small {
    max-height: 300px;
}

/* ===========================================
   グリッドレイアウト
   =========================================== */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* ===========================================
   ニュースリスト
   =========================================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-content h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-content h3 a {
    color: #333;
    text-decoration: none;
}

.news-content h3 a:hover {
    color: #4a9eff;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #666;
}

.news-meta .player-names {
    color: #4a9eff;
}

/* ===========================================
   ユーティリティ
   =========================================== */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.p-20 {
    padding: 20px;
}

.empty-message {
    color: #666;
    text-align: center;
    padding: 20px;
}

.empty-message.inline {
    padding: 10px 0;
    text-align: left;
}

/* ===========================================
   テーブル横スクロールコンテナ
   =========================================== */
.table-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ドラフト実績テーブル */
.team-table.draft-history {
    min-width: 400px;
}

.team-table.ob-history {
    min-width: 500px;
}

/* ドラフト候補テーブル */
.team-table.candidates {
    min-width: 550px;
}

/* 成績テーブル */
.team-table.stats-table {
    min-width: 600px;
}

.team-table td.nowrap,
.team-table th.nowrap {
    white-space: nowrap;
}

/* ===========================================
   レスポンシブ
   =========================================== */
@media (max-width: 768px) {
    .team-header {
        padding: 16px;
    }

    .team-header h1 {
        font-size: 1.4rem;
    }

    .team-header-meta {
        font-size: 0.85rem;
        gap: 12px;
    }

    .team-section {
        padding: 16px;
    }

    .team-section .section-title {
        font-size: 1.1rem;
    }

    .team-table {
        font-size: 0.85rem;
    }

    .team-table th,
    .team-table td {
        padding: 6px 4px;
    }

    .team-table.draft-history th,
    .team-table.draft-history td {
        white-space: nowrap;
    }

    .news-item {
        flex-direction: column;
        gap: 12px;
    }

    .news-image {
        width: 100%;
        height: 160px;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }
}
