/* ======================================================
   SIXSTATS EVENT PROFILE
   Matches the player/team profile visual system.
   Load after styling2.1.css.
====================================================== */

.eventProfilePage {
    width: 70vw !important;
    max-width: 72.92vw !important;
    margin: 2vw auto 4vw !important;
    padding: 1.4vw !important;

    background: rgba(255,255,255,0.025) !important;
    border: 0.052vw solid rgba(255,255,255,0.10) !important;
    border-radius: 1vw !important;
    box-shadow: 0 0.8vw 2.2vw rgba(0,0,0,0.32) !important;
}

.eventProfilePage button,
.eventProfilePage select {
    font-family: "Oswald", system-ui, sans-serif;
}

/* ======================================================
   EVENT HERO
====================================================== */

#eventProfileHero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.2vw;

    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(135,206,250,0.18),
            transparent 28vw
        ),
        linear-gradient(
            135deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-card);

    border: 0.052vw solid rgba(135,206,250,0.20);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

#eventHeroTopBar {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1vw 1.2vw 0;
}

#eventProfileHero #backButton {
    width: 2.7vw;
    height: 2.7vw;
    min-width: 2.19vw;
    min-height: 2.19vw;
    margin: 0;

    color: var(--accent);
    background: rgba(135,206,250,0.12);
    border: 0.052vw solid rgba(135,206,250,0.28);
    border-radius: 50vw;

    font-size: 0.9vw;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

#eventProfileHero #backButton:hover {
    transform: translateY(-0.12vw);
    background: rgba(135,206,250,0.20);
    border-color: rgba(135,206,250,0.50);
}

#eventProfileType {
    display: inline-flex;
    align-items: center;
    gap: 0.5vw;
    padding: 0.45vw 0.7vw;

    color: var(--text-muted);
    background: rgba(15,17,21,0.55);
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.7vw;
    letter-spacing: 0.04vw;
    text-transform: uppercase;
}

#eventProfileStatusDot {
    width: 0.48vw;
    height: 0.48vw;
    min-width: 0.365vw;
    min-height: 0.365vw;
    border-radius: 50%;
}

#eventProfileType.isLive #eventProfileStatusDot {
    background: #4ade80;
    box-shadow: 0 0 0 0.22vw rgba(74,222,128,0.12);
}

#eventProfileType.isUpcoming #eventProfileStatusDot {
    background: var(--accent);
    box-shadow: 0 0 0 0.22vw rgba(135,206,250,0.12);
}

#eventProfileType.isCompleted #eventProfileStatusDot {
    background: var(--text-muted);
    box-shadow: 0 0 0 0.22vw rgba(154,164,178,0.10);
}

#eventHeroLayout {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(17vw, 0.72fr) minmax(0, 1.28fr);
    gap: 2vw;
    align-items: stretch;

    padding: 1vw 1.4vw 1.4vw;
}

/* ======================================================
   EVENT IMAGE
====================================================== */

#eventHeroVisual {
    min-width: 0;
}

#eventImageFrame {
    position: relative;
    width: 19vw;
    height: 19vw;
    min-height: 17.71vw;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(135,206,250,0.16),
            transparent 55%
        ),
        linear-gradient(
            150deg,
            rgba(135,206,250,0.08),
            rgba(15,17,21,0.75)
        ),
        var(--bg-secondary);

    border: 0.052vw solid rgba(255,255,255,0.10);
    border-radius: var(--radius);
    box-shadow: 0 1vw 2vw rgba(0,0,0,0.32);
}

.eventProfilePage #eventsPageImage {
    width: 13vw !important;
    height: 13vw !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0.8vw 1.2vw rgba(0,0,0,0.38));
}

/* ======================================================
   EVENT IDENTITY + INFORMATION
====================================================== */

#eventHeroDetails {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 1vw 0;
}

.eventProfileEyebrow {
    margin: 0 0 0.45vw;

    color: var(--accent);
    font-size: 0.7vw;
    font-weight: 600;
    letter-spacing: 0.12vw;
    text-transform: uppercase;
}

.eventProfilePage .eventTitle {
    overflow: visible;
    margin: 0;
    padding-bottom: 0.08vw;

    color: var(--text-main);
    font-size: 2.5vw;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.08vw;
    text-align: left;

    overflow-wrap: anywhere;
}

#eventHeroLocation {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    margin-top: 0.65vw;

    color: var(--text-muted);
    font-size: 1.05vw;
}

#eventHeroLocation i {
    color: var(--accent);
}

.eventProfilePage #eventsInfoDiv {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7vw;

    width: 100%;
    max-width: none;
    margin: 1.5vw 0 0;
    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
}

.eventInfoItem {
    min-width: 0;
    padding: 0.85vw;

    background: rgba(15,17,21,0.48);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.eventInfoItemAccent {
    border-color: rgba(135,206,250,0.20);
    background:
        linear-gradient(
            135deg,
            rgba(135,206,250,0.08),
            transparent
        ),
        rgba(15,17,21,0.48);
}

.eventInfoItemLabel {
    display: block;
    margin-bottom: 0.45vw;

    color: var(--text-muted);
    font-size: 0.62vw;
    letter-spacing: 0.05vw;
    text-transform: uppercase;
}

.eventInfoItem strong {
    display: block;
    overflow: visible;
    max-width: 100%;
    padding-bottom: 0.08vw;

    color: var(--text-main);
    font-size: 1vw;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.eventInfoItemAccent strong {
    color: var(--accent);
}

.eventInfoItem small {
    display: block;
    margin-top: 0.3vw;
    color: var(--text-muted);
    font-size: 0.58vw;
    line-height: 1.2;
}

#eventProfileActions {
    display: flex;
    gap: 0.7vw;
    margin-top: 1vw;
}

.eventProfileAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45vw;

    min-height: 2.6vw;
    padding: 0.55vw 0.9vw;

    color: var(--text-main);
    background: rgba(255,255,255,0.04);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);

    font-size: 0.78vw;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.eventProfileAction:hover {
    transform: translateY(-0.1vw);
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(135,206,250,0.38);
}

/* ======================================================
   SHARED EVENT SECTIONS
====================================================== */

.eventProfilePage .eventProfileSection,
.eventProfilePage #standingsDiv,
.eventProfilePage #eventBracketDiv {
    width: 100%;
    max-width: none;
    margin: 1.2vw auto;
    padding: 1.2vw;

    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.eventSectionHeading,
.eventTabHeading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1vw;
    margin-bottom: 1vw;
}

.eventProfilePage .eventSectionHeader,
.eventTabHeading h2 {
    margin: 0.25vw 0 0;
    color: var(--text-main);
    font-size: 1.45vw;
    text-align: left;
}

.eventSectionCount {
    padding: 0.4vw 0.7vw;

    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.68vw;
    white-space: nowrap;
}

.eventProfilePage #eventTabsAdDiv {
    width: 100%;
    margin: 1.3vw auto;
}

/* ======================================================
   PARTICIPANTS
====================================================== */

.eventProfilePage #eventParticipantDiv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65vw;
    margin: 0;
}

.participantLink {
    display: block;
    min-width: 0;
}

.eventProfilePage .participantTile {
    display: grid;
    grid-template-columns: 4.6vw minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    min-height: 5.6vw;
    padding: 0.7vw;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-secondary);

    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.eventProfilePage .participantTile:hover {
    transform: translateY(-0.15vw);
    background:
        linear-gradient(
            145deg,
            rgba(135,206,250,0.10),
            rgba(135,206,250,0.02)
        ),
        var(--bg-secondary);
    border-color: rgba(135,206,250,0.35);
}

.participantLogoWrap {
    width: 4.6vw;
    height: 4.6vw;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(135,206,250,0.16),
            transparent 58%
        ),
        rgba(15,17,21,0.55);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.eventProfilePage .participantLogo {
    width: 3.2vw;
    height: 3.2vw;
    min-width: 0;
    min-height: 0;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 0.35vw 0.55vw rgba(0,0,0,0.34));
}

.participantInfo {
    min-width: 0;
    padding: 0 0.7vw;
}

.eventProfilePage .participantTitle {
    overflow: hidden;
    margin: 0;
    padding-bottom: 0.05vw;

    color: var(--text-main);
    font-size: 1vw;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participantInfo p {
    overflow: hidden;
    margin-top: 0.2vw;
    color: var(--text-muted);
    font-size: 0.62vw;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participantArrow {
    color: var(--accent);
    font-size: 1vw;
    opacity: 0.65;
}

/* ======================================================
   TABLES
====================================================== */

.eventProfilePage #standingsstable,
.eventProfilePage #eventfullstatstable,
.eventProfilePage #statstable,
.eventProfilePage #eventTeamStatsTable,
.eventProfilePage #EventMapStatstable,
.eventProfilePage #EventOperatorStatstable {
    width: 100%;
    /* table-layout: auto; */
    margin: 0;
    border-collapse: collapse;
    overflow: hidden;

    background: transparent;
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.eventProfilePage #standingsstable th,
.eventProfilePage #eventfullstatstable th,
.eventProfilePage #statstable th,
.eventProfilePage #eventTeamStatsTable th,
.eventProfilePage #EventMapStatstable th,
.eventProfilePage #EventOperatorStatstable th {
    padding: 0.8vw;

    color: var(--text-main);
    background: var(--bg-secondary);
    border-bottom: 0.052vw solid var(--border-soft);

    font-size: 0.85vw;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.eventProfilePage #standingsstable td,
.eventProfilePage #eventfullstatstable td,
.eventProfilePage #statstable td,
.eventProfilePage #eventTeamStatsTable td,
.eventProfilePage #EventMapStatstable td,
.eventProfilePage #EventOperatorStatstable td {
    padding: 0.78vw;

    color: var(--text-muted);
    border-bottom: 0.052vw solid rgba(255,255,255,0.055);

    font-size: 0.85vw;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.eventProfilePage #standingsstable tbody tr,
.eventProfilePage #eventfullstatstable tbody tr,
.eventProfilePage #statstable tbody tr,
.eventProfilePage #eventTeamStatsTable tbody tr,
.eventProfilePage #EventMapStatstable tbody tr,
.eventProfilePage #EventOperatorStatstable tbody tr {
    transition: background 0.15s ease;
}

.eventProfilePage #standingsstable tbody tr:hover,
.eventProfilePage #eventfullstatstable tbody tr:hover,
.eventProfilePage #statstable tbody tr:hover,
.eventProfilePage #eventTeamStatsTable tbody tr:hover,
.eventProfilePage #EventMapStatstable tbody tr:hover,
.eventProfilePage #EventOperatorStatstable tbody tr:hover {
    background: rgba(135,206,250,0.055);
}

.eventProfilePage #standingsstable th:first-child,
.eventProfilePage #standingsstable td:first-child {
    width: 1%;
    padding-left: 0.55vw;
    padding-right: 0.55vw;
    white-space: nowrap;
}

.eventProfilePage #standingsstable td:nth-child(2) {
    text-align: left;
}

.eventProfilePage #playerEventLogo,
.eventProfilePage #qualifiesToLogo,
.eventProfilePage #teamsSortedLogo {
    display: inline-block;
    width: 1.8vw;
    height: 1.8vw;
    min-width: 1.25vw;
    min-height: 1.25vw;
    margin: 0 0.4vw 0 0;
    object-fit: contain;
    vertical-align: middle;
}

.eventProfilePage #qualifiesToLogo {
    margin: 0 0 0 0.4vw;
}

.eventProfilePage #teamPageLink:hover,
.eventProfilePage #playerprofilelink:hover,
.eventProfilePage .qualifiesToLink:hover {
    color: var(--accent);
    text-decoration: underline;
}

.eventProfilePage #eventAwardsCaption,
.eventProfilePage #statstable caption {
    padding: 0.8vw;
    color: var(--text-main);
    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.88vw;
    text-align: left;
}

.eventProfilePage .teamSortDiv + .teamSortDiv {
    margin-top: 1vw;
}

.eventProfilePage .teamSortedCaption {
    font-weight: 600;
}

.eventProfilePage .statsopimg {
    width: 2.2vw;
    height: 2.2vw;
    min-height: 0;
    margin: 0 auto;
    object-fit: contain;
}

.mapCell {
    color: white !important;
}

.siteCell {
    color: var(--text-main) !important;
}

/* Sortable headers */
.eventProfilePage th[data-sort] {
    position: relative;
    padding-right: 1.3vw !important;
    cursor: pointer;
    user-select: none;
}

.eventProfilePage th[data-sort]::after {
    position: absolute;
    right: 0.35vw;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    font-size: 0.55vw;
}

.eventProfilePage th.sorted-asc::after,
.eventProfilePage th.sort-asc::after {
    content: "▲";
    opacity: 1;
}

.eventProfilePage th.sorted-desc::after,
.eventProfilePage th.sort-desc::after {
    content: "▼";
    opacity: 1;
}

/* Keep the table cell itself centered */
.eventProfilePage #standingsDiv #standingsstable td:nth-child(2) {
    text-align: center;
}

/* Center this fixed-width group, but left-align its contents */
.eventProfilePage .standingsTeamIdentity {
    display: inline-grid;
    grid-template-columns: 1.8vw minmax(0, 1fr);
    align-items: center;
    column-gap: 0.45vw;

    width: 12vw;
    text-align: left;
    margin-left: 5vw
}

.eventProfilePage .standingsTeamIdentity #playerEventLogo {
    width: 1.8vw;
    height: 1.8vw;
    margin: 0;
}

.eventProfilePage .standingsTeamIdentityTbd {
    display: inline-block;
}

/* ======================================================
   EVENT AWARDS TABLE
   Kept separate from #standingsstable so both tables can
   be adjusted independently.
====================================================== */

.eventProfilePage #eventAwardsTable {
    width: 100%;
    margin: 0 auto;
    table-layout: fixed;
    border-collapse: collapse;
    overflow: hidden;

    background: transparent;
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.eventProfilePage #eventAwardsTable th {
    padding: 0.8vw;

    color: var(--text-main);
    background: var(--bg-secondary);
    border-bottom: 0.052vw solid var(--border-soft);

    font-size: 0.85vw;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.eventProfilePage #eventAwardsTable td {
    padding: 0.9vw 0.8vw;

    color: var(--text-muted);
    border-bottom: 0.052vw solid rgba(255,255,255,0.055);

    font-size: 0.85vw;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
}

.eventProfilePage #eventAwardsTable tbody tr {
    transition: background 0.15s ease;
}

.eventProfilePage #eventAwardsTable tbody tr:hover {
    background: rgba(135,206,250,0.055);
}

.eventProfilePage .eventAwardPlayer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45vw;
}

.eventProfilePage .eventAwardTeamLogo {
    display: block;
    width: 1.8vw;
    height: 1.8vw;
    object-fit: contain;
}

.eventProfilePage .eventAwardPlayerLink {
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.15s ease;
}

.eventProfilePage .eventAwardPlayerLink:hover {
    color: var(--accent);
}

.eventProfilePage .eventAwardBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35vw;
    padding: 0.3vw 0.65vw;

    color: var(--accent);
    background: rgba(135,206,250,0.09);
    border: 0.052vw solid rgba(135,206,250,0.22);
    border-radius: 50vw;

    font-weight: 600;
}

/* ======================================================
   BRACKET
====================================================== */

.eventProfilePage #eventBracketDiv {
    display: block;
}

.eventProfilePage .bracketCard {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 1vw;
    overflow-x: auto;
    overflow-y: visible;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.035),
            rgba(255,255,255,0.01)
        ),
        var(--bg-secondary);

    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.eventProfilePage .bracketHeader {
    margin-bottom: 1vw;
}

.eventProfilePage .bracketTitle {
    color: var(--text-main);
    font-size: 0.9vw;
}

.eventProfilePage .bracketSubtitle {
    color: var(--text-muted);
    font-size: 0.72vw;
}

.eventProfilePage .bracket {
    --colW: 10vw;
    --rowH: 3vw;
    --colGap: 1vw;
    --gapRowH: 0.2vw;
    --padY: 2vw;
}

.eventProfilePage .match {
    background: rgba(15,17,21,0.62);
    border-color: var(--border-soft);
}

/* ======================================================
   RECENT MATCHES
====================================================== */

.eventProfilePage #eventMatchesContainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7vw;
    margin: 0;
}

.eventProfilePage #eventMatchesContainer > a {
    display: block;
    min-width: 0;
}

.eventProfilePage .eventMatchTile {
    display: grid;
    grid-template-columns: 2.8vw minmax(0, 1fr) 2.8vw;
    align-items: center;
    gap: 0.55vw;
    min-height: 6.3vw;
    padding: 0.85vw;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-secondary);

    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.eventProfilePage .eventMatchTile:hover {
    transform: translateY(-0.15vw);
    background:
        linear-gradient(
            145deg,
            rgba(135,206,250,0.10),
            rgba(135,206,250,0.02)
        ),
        var(--bg-secondary);
    border-color: rgba(135,206,250,0.35);
}

.eventProfilePage .eventMatchTileDate,
.eventProfilePage .eventMatchTileTime {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.65vw;
    line-height: 1.25;
}

.eventProfilePage .eventMatchTileDate {
    text-align: left;
}

.eventProfilePage .eventMatchTileTime {
    text-align: center;
}

.eventProfilePage .eventMatchTileTeams {
    grid-column: 2;
    margin: 0;
    color: var(--text-main);
    font-size: 0.85vw;
    text-align: center;
}

.eventProfilePage .eventmatchscore,
.eventProfilePage .matchType {
    color: var(--accent);
}

.eventProfilePage .eventMatchTileLogo1,
.eventProfilePage .eventMatchTileLogo2 {
    width: 2.5vw;
    height: 2.5vw;
    min-height: 0;
    object-fit: contain;
}

.eventProfilePage .eventMatchesShowMoreTile {
    min-height: 6.3vw;
    padding: 1vw;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(135,206,250,0.08);
    border: 0.052vw solid rgba(135,206,250,0.24);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.eventProfilePage .eventMatchesShowMoreTile:hover {
    transform: translateY(-0.15vw);
    background: rgba(135,206,250,0.14);
}

.eventProfilePage .eventMatchesShowMore {
    color: var(--accent);
    font-size: 0.78vw;
}

/* ======================================================
   DATA TABS
====================================================== */

.eventProfilePage > .tab {
    position: sticky;
    z-index: 20;
    top: 0.7vw;

    display: flex;
    justify-content: flex-start;
    gap: 0.55vw;
    overflow-x: auto;

    margin: 1.2vw 0;
    padding: 0.7vw;

    background: rgba(28,34,48,0.94);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: 0 0.7vw 1.6vw rgba(0,0,0,0.25);
    backdrop-filter: blur(0.625vw);
}

.eventProfilePage .tablinks {
    flex: 0 0 auto;
    padding: 0.55vw 0.95vw;

    color: var(--text-main);
    background: transparent;
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.78vw;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.eventProfilePage .tablinks:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(135,206,250,0.35);
}

.eventProfilePage .tablinks.active {
    color: #000;
    background: var(--accent);
    border-color: var(--accent);
}

.eventProfilePage .tabcontent {
    width: 100%;
    max-width: none;
    margin: 0 0 1.2vw;
    padding: 1.2vw;

    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.eventTabHeading h2 {
    margin: 0.25vw 0 0;
}

/* ======================================================
   SORT-BY-TEAM TOGGLE
====================================================== */

.eventProfilePage #sortbyteamcontainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7vw;

    margin: 0 0 1vw;
    padding: 0.8vw;

    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.eventProfilePage #sortbyteamtitle {
    color: var(--text-muted);
    font-size: 0.78vw;
}

.eventProfilePage .switch {
    width: 3.2vw;
    height: 1.7vw;
    min-width: 0;
    min-height: 0;
}

.eventProfilePage .slider {
    border: 0.052vw solid var(--border-soft);
}

.eventProfilePage .slider::before {
    width: 1.3vw;
    height: 1.3vw;
    min-width: 0;
    min-height: 0;
}

.eventProfilePage .switch input:checked + .slider::before {
    transform: translateX(1.4vw);
}

.eventProfilePage #fullstatsdiv,
.eventProfilePage #sortedTeamsDiv {
    width: 100%;
    overflow-x: auto;
}

/* ======================================================
   RESPONSIVE — TABLET
====================================================== */

@media (max-width: 1150px) {
    .eventProfilePage {
        width: 92vw !important;
        max-width: 92vw !important;
    }

    #eventHeroLayout {
        grid-template-columns: minmax(22.61vw, 0.75fr) 1.25fr;
    }

    .eventProfilePage #eventsInfoDiv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eventProfilePage #eventParticipantDiv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ======================================================
   RESPONSIVE — MOBILE
====================================================== */

@media (max-width: 768px) {
    .eventProfilePage {
        width: 94vw !important;
        max-width: 94vw !important;
        margin: 14px auto 24px !important;
        padding: 10px !important;
        border-radius: 14px !important;
    }

    #eventProfileHero {
        border-radius: 14px;
    }

    #eventHeroTopBar {
        padding: 12px 12px 0;
    }

    #eventProfileHero #backButton {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        font-size: 14px;
    }

    #eventProfileType {
        gap: 7px;
        padding: 7px 10px;
        font-size: 10px;
    }

    #eventProfileStatusDot {
        width: 7px;
        height: 7px;
        min-width: 7px;
        min-height: 7px;
    }

    #eventHeroLayout {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
    }

    #eventImageFrame {
        width: 100%;
        height: 260px;
        min-height: 0;
        border-radius: 14px;
    }

    .eventProfilePage #eventsPageImage {
        width: 170px !important;
        height: 170px !important;
    }

    #eventHeroDetails {
        padding: 4px 0 0;
    }

    .eventProfileEyebrow {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .eventProfilePage .eventTitle {
        font-size: 34px;
        letter-spacing: -0.5px;
    }

    #eventHeroLocation {
        gap: 7px;
        margin-top: 7px;
        font-size: 14px;
    }

    .eventProfilePage #eventsInfoDiv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
    }

    .eventInfoItem {
        padding: 11px;
        border-radius: 10px;
    }

    .eventInfoItemLabel {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 0.6px;
    }

    .eventInfoItem strong {
        font-size: 16px;
    }

    .eventInfoItem small {
        margin-top: 5px;
        font-size: 10px;
    }

    #eventProfileActions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .eventProfileAction {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 10px;
        font-size: 13px;
    }

    .eventProfilePage .eventProfileSection,
    .eventProfilePage #standingsDiv,
    .eventProfilePage #eventBracketDiv {
        margin: 12px auto;
        padding: 12px;
        border-radius: 14px;
    }

    .eventProfilePage #eventBracketDiv {
        display: none !important;
    }

    .eventSectionHeading,
    .eventTabHeading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .eventProfilePage .eventSectionHeader,
    .eventTabHeading h2 {
        margin-top: 3px;
        font-size: 19px;
    }

    .eventSectionCount {
        padding: 6px 9px;
        font-size: 11px;
    }

    .eventProfilePage #eventTabsAdDiv {
        margin: 12px auto;
    }

    .eventProfilePage #eventParticipantDiv {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .eventProfilePage .participantTile {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        min-height: 88px;
        padding: 8px;
        border-radius: 10px;
    }

    .participantLogoWrap {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .eventProfilePage .participantLogo {
        width: 52px;
        height: 52px;
    }

    .participantInfo {
        padding: 0 10px;
    }

    .eventProfilePage .participantTitle {
        font-size: 17px;
    }

    .participantInfo p {
        margin-top: 3px;
        font-size: 11px;
    }

    .participantArrow {
        font-size: 16px;
    }

    .eventProfilePage #standingsstable,
    .eventProfilePage #eventfullstatstable,
    .eventProfilePage #statstable,
    .eventProfilePage #eventTeamStatsTable,
    .eventProfilePage #EventMapStatstable,
    .eventProfilePage #EventOperatorStatstable {
        display: block;
        width: 100%;
        overflow-x: auto;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .eventProfilePage #standingsstable th,
    .eventProfilePage #standingsstable td,
    .eventProfilePage #eventfullstatstable th,
    .eventProfilePage #eventfullstatstable td,
    .eventProfilePage #statstable th,
    .eventProfilePage #statstable td,
    .eventProfilePage #eventTeamStatsTable th,
    .eventProfilePage #eventTeamStatsTable td,
    .eventProfilePage #EventMapStatstable th,
    .eventProfilePage #EventMapStatstable td,
    .eventProfilePage #EventOperatorStatstable th,
    .eventProfilePage #EventOperatorStatstable td {
        padding: 10px;
        font-size: 12px;
    }

    .eventProfilePage #eventAwardsTable {
        width: 100%;
        margin: 0 auto;
        border-radius: 10px;
    }

    .eventProfilePage #eventAwardsTable th,
    .eventProfilePage #eventAwardsTable td {
        padding: 10px;
        font-size: 12px;
    }

    .eventProfilePage .eventAwardPlayer {
        gap: 7px;
    }

    .eventProfilePage .eventAwardTeamLogo {
        width: 26px;
        height: 26px;
    }

    .eventProfilePage .eventAwardBadge {
        gap: 5px;
        padding: 5px 9px;
        border-width: 1px;
        font-size: 12px;
    }

    .eventProfilePage #playerEventLogo,
    .eventProfilePage #qualifiesToLogo,
    .eventProfilePage #teamsSortedLogo {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }

    .eventProfilePage .statsopimg {
        width: 34px;
        height: 34px;
    }

    .eventProfilePage th[data-sort] {
        padding-right: 24px !important;
    }

    .eventProfilePage th[data-sort]::after {
        right: 7px;
        font-size: 9px;
    }

    .eventProfilePage #eventPlayoffBracketHeader {
        display: block;
    }

    .eventProfilePage .bracketCard {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 68vh;
        min-height: 420px;
        max-height: 620px;
        padding: 10px;
        overflow: auto;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
        scrollbar-width: thin;
        scrollbar-color: rgba(135,206,250,0.35) rgba(255,255,255,0.04);
    }

    .eventProfilePage .bracketHeader {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
    }

    .eventProfilePage .bracketTitle {
        font-size: 15px;
    }

    .eventProfilePage .bracketSubtitle {
        font-size: 12px;
    }

    .eventProfilePage .bracket {
        --colW: 170px;
        /*
         * The match cards are roughly 100px tall on mobile. Giving each
         * bracket row that full height preserves the positions supplied by
         * bracket_col/bracket_row and prevents neighbouring cards overlapping.
         */
        --rowH: 104px;
        --colGap: 16px;
        --gapRowH: 8px;
        --padY: 24px;

        position: relative;
        width: max-content;
        min-width: 100%;
        min-height: max-content;
        padding: var(--padY) 6px;
    }

    .eventProfilePage .bracketGridWrap {
        position: relative;
        display: inline-block;
        width: max-content;
        min-width: 100%;
    }

    .eventProfilePage .bracketGrid {
        display: grid;
        grid-auto-columns: var(--colW);
        column-gap: var(--colGap);
        row-gap: 0;
        width: max-content;
        min-width: 100%;
        align-items: start;
    }

    .eventProfilePage .bracketGrid .match {
        grid-row: span 2;
        align-self: center;
        position: relative;
    }

    .eventProfilePage .bracketLines {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        pointer-events: none;
    }

    .eventProfilePage .match {
        width: var(--colW);
        min-width: var(--colW);
        padding: 8px;
        border: 1px solid var(--border-soft);
        border-radius: 8px;
        box-sizing: border-box;
        transform: none;
    }

    .eventProfilePage .match:hover,
    .eventProfilePage .match:focus-visible {
        transform: none;
    }

    .eventProfilePage .matchRoundTag {
        margin: 0 0 5px 2px;
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .eventProfilePage .team {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        min-width: 0;
        padding: 6px 7px;

        color: var(--text-main);
        background: rgba(255,255,255,0.035);
        border-radius: 6px;

        font-size: 11px;
        line-height: 1.2;
    }

    .eventProfilePage .team + .team {
        margin-top: 6px;
    }

    .eventProfilePage .bracketTeamImg {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .eventProfilePage .teamName {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .eventProfilePage .teamScore {
        color: var(--text-muted);
        font-variant-numeric: tabular-nums;
    }

    .eventProfilePage .team.isWinner {
        background: rgba(135,206,250,0.12);
        outline: 1px solid rgba(135,206,250,0.55);
    }

    .eventProfilePage .team.isLoser {
        opacity: 0.65;
    }

    .eventProfilePage #eventMatchesContainer {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .eventProfilePage .eventMatchTile {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        min-height: 112px;
        gap: 8px;
        padding: 11px;
        border-radius: 10px;
    }

    .eventProfilePage .eventMatchTileDate,
    .eventProfilePage .eventMatchTileTime {
        font-size: 11px;
    }

    .eventProfilePage .eventMatchTileTeams {
        font-size: 14px;
    }

    .eventProfilePage .eventMatchTileLogo1,
    .eventProfilePage .eventMatchTileLogo2 {
        width: 40px;
        height: 40px;
    }

    .eventProfilePage .eventMatchesShowMoreTile {
        min-height: 54px;
        padding: 10px;
        border-radius: 10px;
    }

    .eventProfilePage .eventMatchesShowMore {
        font-size: 13px;
    }

    .eventProfilePage > .tab {
        position: static;
        gap: 7px;
        margin: 12px 0;
        padding: 9px;
        border-radius: 14px;
    }

    .eventProfilePage .tablinks {
        padding: 8px 11px;
        font-size: 12px;
    }

    .eventProfilePage .tabcontent {
        margin-bottom: 12px;
        padding: 12px;
        overflow: hidden;
        border-radius: 14px;
    }

    .eventProfilePage #sortbyteamcontainer {
        gap: 9px;
        padding: 10px;
        border-radius: 10px;
    }

    .eventProfilePage #sortbyteamtitle {
        font-size: 12px;
    }

    .eventProfilePage .switch {
        width: 46px;
        height: 26px;
    }

    .eventProfilePage .slider::before {
        width: 20px;
        height: 20px;
        left: 3px;
        bottom: 2px;
    }

    .eventProfilePage .switch input:checked + .slider::before {
        transform: translateX(20px);
    }

    .eventProfilePage .standingsTeamIdentity {
        grid-template-columns: 26px minmax(0, 1fr);
        column-gap: 7px;
        width: 180px;
    }

    .eventProfilePage .standingsTeamIdentity #playerEventLogo {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 430px) {
    #eventImageFrame {
        height: 230px;
    }

    .eventProfilePage #eventsPageImage {
        width: 150px !important;
        height: 150px !important;
    }

    .eventProfilePage .eventTitle {
        font-size: 31px;
    }

    .eventProfilePage #eventsInfoDiv {
        grid-template-columns: 1fr 1fr;
    }

    #eventProfileActions {
        grid-template-columns: 1fr;
    }
}

/* Prevent Oswald descenders from being clipped. */
.eventProfilePage .eventTitle,
.eventInfoItem strong,
.eventInfoItem small,
.eventProfilePage .participantTitle,
.eventProfilePage td,
.eventProfilePage th {
    line-height: 1.25;
}

.eventProfilePage .eventTitle,
.eventInfoItem strong,
.eventInfoItem small {
    overflow: visible;
    padding-bottom: 0.08vw;
}