/*
 Theme Name:    kaigai
 Theme URI:     https://wpastra.com/
 Description:  Astra Child Theme
 Author:        Your Name
 Author URI:    https://example.com
 Template:      astra
 Version:       1.0.0
*/

/* --- 基本レイアウト・コンテナ --- */
.football-schedule {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    color: #333;
}

.schedule-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 10px;
}

/* --- ナビゲーションタブ --- */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.tab-item {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    color: #64748b;
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.tab-item:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.tab-item.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.tab-item.home-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.tab-item.home-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

/* --- スケジュール表示エリア --- */
.date-heading {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 8px 14px;
    border-left: 4px solid #2563eb;
    margin-top: 15px;
    margin-bottom: 0;
}

.schedule-container {
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #cbd5e1;
    margin-bottom: 15px;
}

/* --- 試合カード（行）とゼブラ柄・ホバー表示 --- */
.match-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    gap: 10px;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.match-card:last-child {
    border-bottom: none;
}

.match-card:nth-child(odd) {
    background-color: #ffffff;
}

.match-card:nth-child(even) {
    background-color: #f8fafc;
}

.match-card:hover {
    background-color: #f1f5f9;
    cursor: pointer;
}

/* 大会・コンペティション情報 */
.match-comp {
    min-width: 120px;
}

.comp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.2;
}

/* チーム・中央スコア配置 */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.team-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-wrapper.home {
    justify-content: flex-end;
    text-align: right;
}

.team-wrapper.away {
    justify-content: flex-start;
    text-align: left;
}

.team-name {
    font-size: 14px;
    font-weight: bold;
}

.team-crest {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* 日本人選手バッジ */
.jp-badge {
    display: inline-flex;
    align-items: center;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 2px 4px;
    white-space: nowrap;
}

/* 中央の時間・スコア枠 */
.center-box {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.time-badge {
    font-size: 0.85rem;
    font-weight: bold;
    color: #e60012;
    padding: 3px 10px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    min-width: 50px;
    text-align: center;
}

.score-badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    padding: 3px 12px;
    background: #f1f5f9;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    min-width: 50px;
    text-align: center;
}

.sub-time {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

/* 投稿ページ設定 */
.post h3 {
    border-bottom: 1px #000 dotted;
}

div.post h2 {
    padding: 1rem 0;
    border-bottom: 1px #000 solid;
    border-top: 1px #000 solid;
}

/* --- レスポンシブ (スマホ向け: 680px以下) --- */
@media (max-width: 680px) {
    .football-schedule {
        padding: 0 !important;
        font-size: 12px;
    }

    .ast-container, .ast-container-fluid {
        padding-left: 5px;
        padding-right: 5px;
    }

    .schedule-header h2 {
        font-size: 1.15rem;
        margin: 5px 0;
    }

    .schedule-header p {
        font-size: 0.72rem;
    }

    .week-nav {
        margin: 8px 0 !important;
    }

    .week-nav .tab-item {
        font-size: 0.75rem;
        padding: 4px 10px;
        border-radius: 12px;
    }

    .week-nav span {
        font-size: 0.72rem !important;
    }

    .date-heading {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .football-schedule .match-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 6px;
    }

    .football-schedule .match-comp {
        margin-bottom: 6px;
    }

    .comp-badge {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .league-logo {
        width: 14px;
        height: 14px;
    }

    .football-schedule .match-teams {
        width: 100%;
    }

    .football-schedule .team-wrapper {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        flex-direction: column;
        gap: 2px;
    }

    .football-schedule .team-wrapper.home {
        align-items: flex-end;
        text-align: right;
    }

    .football-schedule .team-wrapper.away {
        align-items: flex-start;
        text-align: left;
    }

    .football-schedule .team-name {
        font-size: 10px;
        font-weight: 600;
        white-space: normal;
        word-break: break-word;
        line-height: 1.2;
    }

    .team-crest {
        width: 18px;
        height: 18px;
    }

    .time-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
        min-width: 42px;
    }

    .score-badge {
        font-size: 0.8rem;
        padding: 2px 8px;
        min-width: 42px;
    }

    .sub-time {
        font-size: 0.65rem;
    }

    .football-schedule .jp-badge {
        font-size: 0.62rem;
        padding: 1px 5px;
    }

    .football-schedule .center-box {
        flex-shrink: 0;
        width: 65px;
    }
}

/* --- PC向け幅調整 (1200px以上) --- */
@media (min-width: 1200px) {
    .ast-plain-container.ast-no-sidebar #primary {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}
