/* public_division_detail.css */

/* Цветовые классы */
.text-bronze {
    color: #cd7f32 !important;
}

/* Стили для логотипов команд */
.team-logo-tiny {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid #495057;
    background: #343a40;
    padding: 1px;
}

.team-logo-medium {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid #495057;
    background: #343a40;
    padding: 3px;
}

.team-logo-placeholder-tiny {
    width: 24px;
    height: 24px;
    background: #495057;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #6c757d;
    font-size: 0.7rem;
    color: #6c757d;
}

.team-logo-placeholder-medium {
    width: 60px;
    height: 60px;
    background: #495057;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #6c757d;
    font-size: 1.2rem;
    color: #6c757d;
}

/* Стили таблиц */
.table th {
    border-bottom: 1px solid #495057;
    font-weight: 600;
    font-size: 0.8rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.85rem;
}

.team-row {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #495057;
}

    .team-row:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        border-color: #6c757d;
        background-color: #495057 !important;
    }

/* Карточки игроков */
.player-card {
    border: 1px solid #495057;
    border-radius: 6px;
    padding: 8px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
}

    .player-card:hover {
        border-color: #6c757d;
        background: rgba(255, 255, 255, 0.1);
    }

.jersey-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Статистические элементы */
.stat-item {
    padding: 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    font-size: 0.85rem;
}

.alert-info {
    background: rgba(13,110,253,0.1);
    border: 1px solid rgba(13,110,253,0.3);
    color: #6ea8fe;
    font-size: 0.85rem;
}

.alert-warning {
    background: rgba(255,193,7,0.1);
    border: 1px solid rgba(255,193,7,0.3);
    color: #ffda6a;
    font-size: 0.85rem;
}

/* Элементы матчей */
.match-item {
    border: 1px solid #495057;
    transition: all 0.2s ease;
}

    .match-item:hover {
        border-color: #6c757d;
        background-color: #495057 !important;
        cursor: pointer;
    }

.team-name {
    font-size: 0.8rem;
    line-height: 1.2;
}

.player-stats {
    min-width: 100px;
    text-align: right;
}

.stats-icons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

    .stats-icons small {
        font-size: 0.75rem;
        white-space: nowrap;
    }

.no-stats {
    font-size: 0.7rem;
    color: #6c757d;
}

.match-header {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid #495057;
}

/* События матча */
.event-item {
    border-left: 3px solid #495057;
    padding-left: 15px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

    .event-item:hover {
        border-left-color: #6c757d;
        background: rgba(255,255,255,0.02);
    }

.event-goal {
    border-left-color: #198754;
}

.event-yellow {
    border-left-color: #ffc107;
}

.event-red {
    border-left-color: #dc3545;
}

.event-assist {
    border-left-color: #0dcaf0;
}

.event-minute {
    font-weight: bold;
    color: #6ea8fe;
}

/* Стили для трансферов */
.transfer-item {
    border: 1px solid #495057;
    transition: all 0.2s ease;
}

    .transfer-item:hover {
        border-color: #6c757d;
        background-color: #495057 !important;
    }

.transfer-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transfer-arrow {
    color: #ffc107;
}

/* Стили для вкладок */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    font-size: 0.9rem;
}

.nav-tabs .nav-link.active {
   color: #fff;
   background: transparent;
   border-bottom: 2px solid #0d6efd;
}
.nav-tabs .nav-link.activet {
   color: var(--bs-blue);
   background: white;
}

.nav-pills .nav-link {
    color: #6c757d;
    border: 1px solid #495057;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

    .nav-pills .nav-link.active {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }

/* Стили для статистики */
.stats-table th {
    border-bottom: 1px solid #495057;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 12px;
}

.stats-table td {
    vertical-align: middle;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.stats-table tr:hover {
    background-color: #495057 !important;
}

/* Стили для расписания */
.match-card {
    border: 1px solid #495057;
    transition: all 0.3s ease;
}

    .match-card:hover {
        border-color: #6c757d;
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    }

    .match-card.live {
        border-color: #ffc107;
        background: rgba(255, 193, 7, 0.05);
    }

    .match-card.completed {
        border-color: #198754;
        background: rgba(25, 135, 84, 0.05);
    }

    .match-card.completed_technical {
        border-color: #dc3545;
        background: rgba(220, 53, 69, 0.05);
    }

    .match-card.postponed {
        border-color: #ffc107;
        background: rgba(255, 193, 7, 0.1);
    }

    .match-card.cancelled {
        border-color: #dc3545;
        background: rgba(220, 53, 69, 0.1);
        opacity: 0.8;
    }

.match-time {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 4px;
    min-width: 50px;
}

.score-display {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .player-card {
        font-size: 0.8rem;
    }

    .player-stats {
        min-width: 80px;
    }

    .stats-icons {
        gap: 4px;
    }

        .stats-icons small {
            font-size: 0.65rem;
        }

    .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .nav-pills .nav-link {
        font-size: 0.75rem;
        padding: 0.2rem 0.2rem;
    }

    .match-time {
        min-width: 40px;
        font-size: 0.8rem;
    }

    .score-display {
        min-height: 40px;
    }
}

/* League-space visual refresh for /division/ pages */
.league-space-shell {
    font-family: var(--space-font-family, inherit) !important;
    background:
        var(--space-bg-image, none),
        radial-gradient(circle at top right, color-mix(in srgb, var(--space-accent, #1554c7) 12%, transparent), transparent 36%),
        linear-gradient(135deg, var(--space-bg-from, #f7fbff), var(--space-bg-to, #eef4fb)) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    color: #132238 !important;
}

.league-space-shell .space-topbar {
    background: color-mix(in srgb, var(--space-header-bg, #ffffff) 92%, transparent) !important;
    border-color: color-mix(in srgb, var(--space-header-bg, #ffffff) 72%, #dfe8f3) !important;
}

.league-space-shell .public-division-page {
    color: #132238 !important;
}

.league-space-shell .public-division-page > .container {
    max-width: min(1180px, calc(100vw - 28px));
    margin-top: 0 !important;
}

.league-space-shell .space-division-hero {
    background:
        var(--space-hero-bg-image, none),
        radial-gradient(circle at 88% 8%, rgba(255,255,255,0.18), transparent 24%),
        linear-gradient(135deg, var(--space-hero-bg, #1554c7), color-mix(in srgb, var(--space-hero-bg, #1554c7) 78%, #5ba2ff)) !important;
    background-size: cover, auto, auto !important;
    background-position: center !important;
    border: 0 !important;
    border-radius: 28px !important;
    box-shadow: 0 24px 58px rgba(21, 84, 199, 0.18) !important;
    color: #fff !important;
}

.league-space-shell .space-division-hero__kicker,
.league-space-shell .space-division-hero__copy p,
.league-space-shell .space-division-season span {
    color: rgba(255, 255, 255, 0.72) !important;
}

.league-space-shell .space-division-hero h1,
.league-space-shell .space-division-hero strong {
    color: #fff !important;
}

.league-space-shell .space-division-season .form-select {
    border-color: rgba(255, 255, 255, 0.26) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #132238 !important;
    box-shadow: 0 12px 30px rgba(8, 31, 79, 0.12) !important;
}

.league-space-shell .public-division-page .card,
.league-space-shell .public-division-page .bg-secondarys,
.league-space-shell .public-division-page .bg-dark {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02)),
        color-mix(in srgb, var(--space-block-color, #ffffff) 90%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--space-block-color, #ffffff) 74%, #b8c8df) !important;
    border-radius: 22px !important;
    color: #132238 !important;
    box-shadow: 0 18px 44px rgba(32, 64, 112, 0.10) !important;
    backdrop-filter: blur(14px) !important;
}

.league-space-shell .public-division-page .card-header {
    border-bottom: 1px solid #dfe8f3 !important;
    background: rgba(255, 255, 255, 0.42) !important;
    border-radius: 22px 22px 0 0 !important;
}

.league-space-shell .public-division-page .card-title,
.league-space-shell .public-division-page h1,
.league-space-shell .public-division-page h2,
.league-space-shell .public-division-page h3,
.league-space-shell .public-division-page h4,
.league-space-shell .public-division-page h5,
.league-space-shell .public-division-page h6,
.league-space-shell .public-division-page .text-white {
    color: #132238 !important;
}

.league-space-shell .public-division-page .text-muted,
.league-space-shell .public-division-page small {
    color: #7b8aa3 !important;
}

.league-space-shell .public-division-page .nav-tabs {
    gap: 8px;
    border-bottom: 0 !important;
}

.league-space-shell .public-division-page .nav-tabs .nav-link,
.league-space-shell .public-division-page .nav-pills .nav-link {
    min-height: 38px;
    border: 1px solid #dfe8f3 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.64) !important;
    color: #7b8aa3 !important;
    font-size: 0.8rem;
    font-weight: 850;
}

.league-space-shell .public-division-page .nav-tabs .nav-link.active,
.league-space-shell .public-division-page .nav-tabs .nav-link:hover,
.league-space-shell .public-division-page .nav-pills .nav-link.active,
.league-space-shell .public-division-page .nav-pills .nav-link:hover {
    background: var(--space-accent, #1554c7) !important;
    border-color: var(--space-accent, #1554c7) !important;
    color: #fff !important;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--space-accent, #1554c7) 22%, transparent) !important;
}

.league-space-shell .public-division-page .table,
.league-space-shell .public-division-page .table-dark,
.league-space-shell .public-division-page .stats-table {
    --bs-table-bg: rgba(255, 255, 255, 0.90) !important;
    --bs-table-color: #132238 !important;
    --bs-table-border-color: #dfe8f3 !important;
    --bs-table-striped-bg: rgba(247, 250, 255, 0.90) !important;
    --bs-table-striped-color: #132238 !important;
    --bs-table-hover-bg: rgba(238, 245, 255, 0.96) !important;
    --bs-table-hover-color: #132238 !important;
    overflow: hidden;
    border-color: #dfe8f3 !important;
    color: #132238 !important;
}

.league-space-shell .public-division-page .table th,
.league-space-shell .public-division-page .stats-table th {
    border-color: #dfe8f3 !important;
    background: rgba(247, 250, 255, 0.96) !important;
    color: #7b8aa3 !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.league-space-shell .public-division-page .table td,
.league-space-shell .public-division-page .stats-table td {
    border-color: #e6eef8 !important;
    color: #132238 !important;
    background: transparent !important;
}

.league-space-shell .public-division-page .team-row,
.league-space-shell .public-division-page .match-item,
.league-space-shell .public-division-page .player-card,
.league-space-shell .public-division-page .transfer-item,
.league-space-shell .public-division-page .stat-item {
    border-color: #dfe8f3 !important;
    background: rgba(255, 255, 255, 0.76) !important;
    color: #132238 !important;
    box-shadow: none !important;
}

.league-space-shell .public-division-page .team-row:hover,
.league-space-shell .public-division-page .match-item:hover,
.league-space-shell .public-division-page .player-card:hover,
.league-space-shell .public-division-page .transfer-item:hover {
    transform: translateY(-1px);
    background: rgba(238, 245, 255, 0.94) !important;
    border-color: color-mix(in srgb, var(--space-accent, #1554c7) 30%, #dfe8f3) !important;
}

.league-space-shell .public-division-page .team-logo-tiny,
.league-space-shell .public-division-page .team-logo-medium,
.league-space-shell .public-division-page .team-logo-placeholder-tiny,
.league-space-shell .public-division-page .team-logo-placeholder-medium,
.league-space-shell .public-division-page .team-logo-xs {
    border-color: #dfe8f3 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(32, 64, 112, 0.08) !important;
}

.league-space-shell .public-division-page .form-select,
.league-space-shell .public-division-page .form-control {
    border-color: #cdd9e8 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #132238 !important;
}

.league-space-shell .public-division-page .modal-content,
.league-space-shell #teamModal .modal-content,
.league-space-shell #matchEventsModal .modal-content {
    background: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid #dfe8f3 !important;
    border-radius: 26px !important;
    color: #132238 !important;
    box-shadow: 0 34px 90px rgba(23, 53, 103, 0.22) !important;
    backdrop-filter: blur(18px) !important;
}

.league-space-shell .public-division-page .modal-header,
.league-space-shell .public-division-page .modal-footer,
.league-space-shell #teamModal .modal-header,
.league-space-shell #teamModal .modal-footer,
.league-space-shell #matchEventsModal .modal-header,
.league-space-shell #matchEventsModal .modal-footer {
    border-color: #dfe8f3 !important;
    background: rgba(255, 255, 255, 0.58) !important;
}

.league-space-shell .public-division-page .btn-close,
.league-space-shell #teamModal .btn-close,
.league-space-shell #matchEventsModal .btn-close {
    filter: none !important;
}

.league-space-shell #matchEventsModal .match-header,
.league-space-shell .division-timeline-minute {
    background: rgba(238, 245, 255, 0.94) !important;
    border-color: #dfe8f3 !important;
    color: var(--space-accent, #1554c7) !important;
}

.league-space-shell .division-timeline-ladder::before {
    background: linear-gradient(180deg, transparent, #dbe6f4, transparent) !important;
}

.league-space-shell .division-timeline-event {
    background: rgba(255, 255, 255, 0.76) !important;
    border-color: #dfe8f3 !important;
}

.league-space-shell .division-timeline-event__player {
    color: #132238 !important;
}

.league-space-shell .division-timeline-event__team,
.league-space-shell .division-timeline-event__description {
    color: #7b8aa3 !important;
}

.league-space-shell .division-timeline-event__type {
    color: var(--space-accent, #1554c7) !important;
}

@media (max-width: 768px) {
    .league-space-shell .public-division-page > .container {
        max-width: 430px;
        padding: 0 10px;
    }

    .league-space-shell .public-division-page .card,
    .league-space-shell .space-division-hero {
        border-radius: 18px !important;
    }

    .league-space-shell .public-division-page .nav-tabs,
    .league-space-shell .public-division-page .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .league-space-shell .public-division-page .nav-tabs::-webkit-scrollbar,
    .league-space-shell .public-division-page .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .league-space-shell .public-division-page .standings-table-wrap,
    .league-space-shell .public-division-page .goalkeeper-ratings-table-wrap {
        margin-left: -6px;
        margin-right: -6px;
        width: calc(100% + 12px);
        overflow-x: visible;
    }

    .league-space-shell .public-division-page .standings-table,
    .league-space-shell .public-division-page .goalkeeper-ratings-table {
        table-layout: fixed;
        width: 100%;
        min-width: 0;
    }

    .league-space-shell .public-division-page .standings-table th,
    .league-space-shell .public-division-page .standings-table td,
    .league-space-shell .public-division-page .goalkeeper-ratings-table th,
    .league-space-shell .public-division-page .goalkeeper-ratings-table td {
        padding: 0.34rem 0.16rem;
        font-size: 0.68rem;
        line-height: 1.12;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .league-space-shell .public-division-page .standings-table th:first-child,
    .league-space-shell .public-division-page .standings-table td:first-child {
        width: 24px !important;
    }

    .league-space-shell .public-division-page .standings-table th:nth-child(2),
    .league-space-shell .public-division-page .standings-table td:nth-child(2) {
        width: auto;
        min-width: 0;
    }

    .league-space-shell .public-division-page .standings-table th:nth-child(n+3),
    .league-space-shell .public-division-page .standings-table td:nth-child(n+3) {
        width: 25px !important;
    }

    .league-space-shell .public-division-page .standings-table .longText {
        min-width: 0;
        gap: 4px;
    }

    .league-space-shell .public-division-page .standings-table .team-logo-tiny,
    .league-space-shell .public-division-page .standings-table .team-logo-placeholder-tiny,
    .league-space-shell .public-division-page .goalkeeper-ratings-table .team-logo-tiny,
    .league-space-shell .public-division-page .goalkeeper-ratings-table .team-logo-placeholder-tiny {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px;
        margin-right: 3px !important;
        border-radius: 4px;
        padding: 1px;
    }

    .league-space-shell .public-division-page .standings-table .small,
    .league-space-shell .public-division-page .goalkeeper-ratings-table .small {
        font-size: 0.68rem;
    }

    .league-space-shell .public-division-page .standings-table td:nth-child(2) > .d-flex > div,
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(2) > .d-flex > div {
        min-width: 0;
    }

    .league-space-shell .public-division-page .standings-table strong,
    .league-space-shell .public-division-page .goalkeeper-ratings-table strong,
    .league-space-shell .public-division-page .goalkeeper-ratings-table .stats-player-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .league-space-shell .public-division-page .standings-table td:nth-child(2) small {
        display: none;
    }

    .league-space-shell .public-division-page .standings-table svg {
        width: 16px;
        height: 16px;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th:first-child,
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:first-child {
        width: 21px !important;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(2),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(2) {
        width: auto;
        min-width: 0;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(3),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(3) {
        width: 42px !important;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(n+4),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(n+4) {
        width: 26px !important;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(8),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(8),
    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(9),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(9),
    .league-space-shell .public-division-page .goalkeeper-ratings-table th:nth-child(10),
    .league-space-shell .public-division-page .goalkeeper-ratings-table td:nth-child(10) {
        width: 30px !important;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table .badge {
        min-width: 30px;
        padding: 0.18rem 0.25rem;
        font-size: 0.64rem;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table th {
        font-size: 0.58rem;
        text-align: center;
    }

    .league-space-shell .public-division-page .goalkeeper-ratings-table small {
        display: block;
        max-width: 52px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
