/* ====== WRAPPER ====== */
#livescoreContentWrapper {
    padding: 24px 45px 40px;
    width: 100%;
}

/* Center main section and limit width so cards don’t stretch too wide */
.live-all-container {
    max-width: 1240px;
    margin: 0 auto;
}

/* ====== HEADER ====== */
.live-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;    
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--STATUS_APPROVED_COLOR);          /* green dot */
}

.live-title {
	font-family: var(--SECONDARY_FONT_FAMILY);
    font-size: var(--HEADER_FONT_SIZE);
    font-weight: var(--MED_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
    letter-spacing: var(--SECONDARY_FONT_LETTER_SPACING);
}

.back-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 10px;
    background: var(--CARD_2_BG);   /* Same as card background */
    color: var(--TXT_COLOR_1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.back-btn i {
    font-size: 16px;
}

.back-btn:hover {
    background: var(--SCROLLBAR_BG);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ====== GRID LAYOUT (3 per row) ====== */
.livescore-all-live-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* 2 per row on medium, 1 per row on mobile */
@media (max-width: 1200px) {
    .livescore-all-live-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .livescore-all-live-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== CARD ====== */
.livescore-all-match-card {
    background: var(--CARD_1_BG);
    border-radius: 10px;
    padding: 18px 20px 20px;
    color: var(--TXT_COLOR_1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%; /* all cards equal height */
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.livescore-all-match-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1);
    cursor: pointer;
    transform: translateY(-2px);
}

/* ====== HEADER INSIDE CARD ====== */
.livescore-all-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.livescore-all-match-header .league-name {
    display: flex;
    align-items: center;
    color: var(--TXT_COLOR_1);
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    font-family: var(--PRIMARY_FONT_FAMILY);
}

.livescore-all-match-header .league-logo {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    margin-bottom: 1px;
}

.livescore-all-match-header .season {
    gap: 1px;
    display: flex;
    align-items: center;
    color: var(--TXT_COLOR_1);
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    font-family: var(--PRIMARY_FONT_FAMILY);
}

/* reuse dot in header on the right */
.livescore-all-match-header .live-dot {
    background: var(--STATUS_APPROVED_COLOR);
    margin-bottom: 1px;
}

/* ====== Middle: TEAMS + SCORE ====== */
.livescore-all-teams-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0 4px;
}

/* each row: logo | name | score pill */
.livescore-all-teams-wrapper .team-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* logo */
.livescore-all-teams-wrapper .team-row .team-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 32px;
    object-fit: contain;
    margin-right: 12px;
    margin-bottom: 0;
}

/* team name */
.livescore-all-teams-wrapper .team-row .team-name {
    flex: 1 1 auto;
    font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
    line-height: 32px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* small score box on the right */
.livescore-all-teams-wrapper .team-row .score-box {
    flex: 0 0 auto;
    margin-left: 12px;
    width: 35px;
    height: 26px;
    padding: 4px 10px;
    border-radius: 5px;         /* capsule / pill */
    background: var(--SCROLLBAR_BG);
    color: var(--TXT_COLOR_1);
    font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--BODY_TXT_FONT_SIZE);
    font-weight: var(--MED_FONT_WEIGHT);
    text-align: center;
    line-height: 1.2;
    border: 1px solid var(--ICON_DISABLED_BG);
}

/* ====== FOOTER (DATE + ELAPSED TIME) ====== */
.livescore-all-match-footer {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.livescore-all-match-footer .match-date-box,
.livescore-all-match-footer .elapsed-box {
    flex: 1;
    background: var(--CARD_2_BG);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--FORM_TXT_COLOR);
}

.livescore-all-match-footer .label {
	font-weight: var(--LIGHT_FONT_WEIGHT);
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--TXT_COLOR_4);
    margin-bottom: 4px;
}

.livescore-all-match-footer .value {
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    font-weight: var(--LIGHT_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
}

/* small tweak on mobile so cards breathe a bit */
@media (max-width: 768px) {
    #livescoreContentWrapper {
        padding: 16px 12px 24px;
    }
}

/* ===== LiveScore Modal ===== */
.ls-modal {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.ls-modal.active {
    display: flex;
}

/* --- Modal Background Panel --- */
.ls-modal-panel {
    background: var(--CARD_1_BG);
    border-radius: 10px;
    width: 780px;
    max-height: 625px;
    color: var(--MODAL_TXT_COLOR);
    font-family: var(--PRIMARY_FONT_FAMILY);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
    position: relative;
    display: flex;
    flex-direction: column;
    transform: scale(0.96);
    opacity: 0;
    transition: all 0.25s ease-out;
}

.ls-modal.active .ls-modal-panel {
    transform: scale(1);
    opacity: 1;
}

/* --- Header --- */
#ls-modal-content .ls-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--MODAL_HEADER_BG);
    padding: 10px 16px;
    margin-bottom: 5px;
    height: 68px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

#ls-modal-content .ls-modal-header .left {
    display: flex;
    align-items: center;
    gap: 5px;
}

#ls-modal-content .ls-modal-header .league-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

#ls-modal-content .ls-modal-header .league-name {
    font-size: var(--BODY_TXT_FONT_SIZE);
    font-weight: var(--LIGHT_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
}

#ls-modal-content .ls-modal-header .right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Round group with green dot --- */
#ls-modal-content .ls-modal-header .round-group {
    display: flex;
    align-items: center;
    gap: 6px; /* spacing between dot and text */
}

#ls-modal-content .ls-modal-header .live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--STATUS_APPROVED_COLOR); /* Figma green */
    border-radius: 50%;
    display: inline-block;
}

#ls-modal-content .ls-modal-header .live-dot.FT {
    background-color: var(--STATUS_APPROVED_COLOR); /* Green for Finished matches */
}

#ls-modal-content .ls-modal-header .live-dot.NS {
    background-color: var(--TXT_COLOR_4); /* Gray for Not Started */
}

#ls-modal-content .ls-modal-header .round {
    font-size: var(--BODY_TXT_FONT_SIZE);
    color: var(--MODAL_TXT_COLOR);
    font-weight: var(--LIGHT_FONT_WEIGHT);
}

#ls-modal-content .ls-modal-header .ls-modal-close {
    background: var(--THIRD_BTN_BG);
    border: none;
    color: var(--THIRD_BTN_COLOR);
    font-size: var(--ICON_SMALL_FONT_SIZE);
    width: 40px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

/* --- Teams Section --- */
#ls-modal-content .teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 60px;
}

/* Each team container */
#ls-modal-content .team {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 140px; /* consistent width for symmetry */
}

/* Team logo */
#ls-modal-content .team img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

#ls-modal-content .team img:hover {
    transform: scale(1.05);
}

/* Team name */
#ls-modal-content .team .team-name {
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    font-weight: var(--LIGHT_FONT_WEIGHT);
    color: var(--MODAL_TXT_COLOR);
    text-align: center;
    line-height: 1;
}

/* --- Score Section --- */
#ls-modal-content .score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

/* Score boxes */
#ls-modal-content .score-box {
    width: 35px;
    height: 41px;
    background: var(--INPUT_BG);
    border: var(--DISABLED_INPUT_BORDER);
    border-radius: 6px;
    font-family: var(--PRIMARY_FONT_FAMILY);
    color: var(--MODAL_TXT_COLOR);
    font-weight: var(--REG_FONT_WEIGHT);
    font-size: var(--BODY_TXT_FONT_SIZE);
    display: flex;
    align-items: center;
    justify-content: center;
}

#ls-modal-content .score-box.winner {
    color: var(--SECONDARY_COLOR); /* Winner number color */
}

/* Separator */
#ls-modal-content .score-separator {
    font-size: var(--BODY_TXT_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    color: var(--MODAL_TXT_COLOR);
}

/* --- Winner Arrow --- */
#ls-modal-content .winner-arrow {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--SECONDARY_COLOR);
    display: inline-block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Position tweaks */
#ls-modal-content .home-arrow {
    left: calc(50% - 60px); /* shift slightly left from center */
}

#ls-modal-content .away-arrow {
    right: calc(50% - 60px); /* shift slightly right from center */
    transform: translateY(-50%) rotate(180deg);
}

/* Make it responsive */
@media (max-width: 768px) {
    #ls-modal-content .teams {
        padding: 0 20px;
        flex-direction: column;
        gap: 16px;
    }

    #ls-modal-content .score {
        font-size: 32px;
        padding: 10px 24px;
    }

    #ls-modal-content .team img {
        width: 70px;
        height: 70px;
    }

    #ls-modal-content .team .team-name {
        font-size: 14px;
    }
}

/* --- Info Grid --- */
#ls-modal-content .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 15px;
    padding: 0px 35px;
}

#ls-modal-content .info-grid div {
    display: flex;
    flex-direction: column;
    background: var(--CARD_2_BG);
    border-radius: 5px;
    padding: 10px 12px;
    min-height: 52px;
    justify-content: center;
}

#ls-modal-content .info-grid b {
	font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--TXT_COLOR_4);
    font-weight: var(--LIGHT_FONT_WEIGHT);
    display: block;
    margin-bottom: 4px;
}

#ls-modal-content .info-grid span {
    font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--MODAL_TXT_COLOR);
    font-weight: var(--LIGHT_FONT_WEIGHT);
}

/* --- Half Time Section --- */
#ls-modal-content .half-time {
    background: var(--MODAL_BG);
    border-radius: 10px;
    border: var(--SECONDARY_BTN_BORDER);
    padding: 20px 24px;
    text-align: center;
   	margin: 0px 35px 15px;
}

#ls-modal-content .half-time h4 {
	font-family: var(--SECONDARY_FONT_FAMILY);
    font-size: var(--BODY_TXT_FONT_SIZE);
    font-weight: var(--MED_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
    margin-bottom: 16px;
}

#ls-modal-content .half-time-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

#ls-modal-content .half-time-content .team {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#ls-modal-content .half-time-content .team img {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
}

#ls-modal-content .half-time-content .score {
    border-radius: 5px;
    padding: 8px 18px;
}

/* --- Live Dot Base --- */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Match status colors --- */
.live-dot.FT {
    background-color: var(--STATUS_APPROVED_COLOR); /* Green for Finished matches */
}

.live-dot.NS {
    background-color: var(--TXT_COLOR_4); /* Gray for Not Started */
}