/* --------------------------------------------------- */
/* ROOT LAYOUT FOR BRACKET */
/* --------------------------------------------------- */
.icc-knockout {
    display: flex;
    gap: 60px; /* space between rounds */
    position: relative;
}

/* Each round is a vertical stack */
.icc-knockout .round {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* --------------------------------------------------- */
/* MATCH CARD BASE */
/* --------------------------------------------------- */
.icc-knockout .match {
    background: #fff;
    border: 2px solid #eee;
    padding: 10px 15px;
    border-radius: 8px;
    width: 180px;
    margin: 20px 0;
    position: relative;
    text-align: center;
    z-index: 1; /* always above SVG */
}

/* Team labels */
.team-name {
    font-weight: 600;
    font-size: 14px;
}

/* --------------------------------------------------- */
/* VS BOX (better UI) */
/* --------------------------------------------------- */
.vs-box {
    background: #dee2e6;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    color: #555;
    font-size: 12px;
    min-width: 35px;
    text-align: center;
    margin: 6px 0;
}

/* --------------------------------------------------- */
/* INLINE CONNECTORS (fallback) */
/* --------------------------------------------------- */
.icc-knockout .match::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -30px;
    width: 30px;
    height: 2px;
    background: #aaa;
}

/* vertical connector for semifinals */
.icc-knockout .round.semifinals::after {
    content: "";
    position: absolute;
    top: 40px;
    right: -30px;
    width: 2px;
    height: calc(100% - 80px);
    background: #aaa;
}

/* left line for final */
.icc-knockout .round.final .match::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -30px;
    width: 30px;
    height: 2px;
    background: #aaa;
}

/* --------------------------------------------------- */
/* SVG LINES (actual connectors) */
/* --------------------------------------------------- */
#bracketWrapper {
    position: relative;
    padding: 20px 0;
}

.bracket-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none; /* allow clicking cards */
    z-index: 0; /* behind cards */
    display: block;
}

/* default line */
.bracket-line {
    stroke: #9aa6b2;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    transition: stroke 220ms ease, stroke-width 220ms ease;
}

/* winner line highlight */
.bracket-line.winner {
    stroke: #28a745;
    stroke-width: 4;
}

/* --------------------------------------------------- */
/* WINNER & LOSER STYLES */
/* --------------------------------------------------- */
.winner-tag {
    background: #28a745;
    color: #fff;
    padding: 1px 6px;
    font-size: 10px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
}

.winner-team {
    background: #e8f7ec;
    border-left: 4px solid #28a745;
    border-radius: 6px;
    padding: 4px 6px;
}

.loser-team {
    opacity: 0.5;
}

/* full match winner highlight */
.match.winner {
    border-color: #28a745 !important;
    background: #e6ffe6 !important;
}

/* --------------------------------------------------- */
/* HOVER EFFECTS */
/* --------------------------------------------------- */
.match:hover {
    box-shadow: 0 0 8px rgba(255,215,0,0.6);
    border-color: gold;
}
/* --------------------------------------------------- */
