/* Layout wrapper */
.livescore-menu {
	padding-bottom: 16px !important;
	margin-top: 1rem;
}

.container.livescore-menu { 
	position: relative; 
}

.livescore-menu .livescore-wrapper {
	display: grid !important;
	grid-template-columns: auto 1fr auto; 
	align-items: center !important;
	margin-top: 0 !important;
	margin: 0;
	column-gap: 8px;
}

.livescore-menu .livescore-wrapper .title_livescoreDesktop {
	padding: 0;
	color: var(--BODY_TXT_COLOR);
	font-family: var(--SECONDARY_FONT_FAMILY);
	font-size: var(--HEADER_FONT_SIZE);
	font-weight: var(--MED_FONT_WEIGHT);
	letter-spacing: var(--SECONDARY_FONT_LETTER_SPACING);
}

.livescoreNavi-wrapper { 
	padding: 0; 
}

.livescoreNavi_Container { 
	justify-content: flex-end; 
}

.livescoreNaviList { 
	display: flex; 
	gap: 8px; 
}

.livescoreNavi-Search,
.livescoreNavi-Search-btn,
.livescoreNavi-All {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--THIRD_BTN_BG);
	color: var(--THIRD_BTN_COLOR);
	border: none;
	border-radius: 10px;
	width: 42px; 
	height: 40px; 
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}

.livescoreNavi-All {
	width: 65px !important; 
}

.livescoreNavi-Search i {
	 font-size: 16px;
}

.livescoreNavi-All i {
	 margin-left: 6px;
	 font-size: 12px;
}

.livescoreNavi-Search:focus,
.livescoreNavi-All:focus {
	outline: none;
	background-color: var(--THIRD_BTN_BG);
	box-shadow: none;
}

.livescoreNavi-Search:hover,
.livescoreNavi-All:hover {
	 filter: var(--THIRD_BTN_HOVER_BG);
}

.livescoreNavi-All span {
	 font-weight: 500;
}

/* Live Score List */
.livescore-menu .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.livescore-menu .livescorelist-content {
    --grid-cols: 7.5;
    --grid-gap: 10px;
    --item-width: calc((100% - var(--grid-gap) * (var(--grid-cols) - 1)) / var(--grid-cols));

    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 0 24px;
    margin: 0;
    width: 100%;
    scrollbar-width: none;
    justify-content: flex-start;
    direction: ltr;
}

.livescore-menu .livescorelist-content > .col-xl-4,
.livescore-menu .livescorelist-content > .col-lg-4,
.livescore-menu .livescorelist-content > .col-md-6 {
    padding-left: 0;
    padding-right: 0;
    margin-top: 8px;
}

@media (max-width: 1680px) {
    .livescore-menu .livescorelist-content { 
   		--grid-cols: 7.5; 
    }
}
@media (max-width: 1366px) {
    .livescore-menu .livescorelist-content { 
    	--grid-cols: 5.5; 
    }
}
@media (max-width: 1200px) {
    .livescore-menu .livescorelist-content { 
    	--grid-cols: 4.5; 
    }
}
@media (max-width: 1024px) {
    .livescore-menu .livescorelist-content { 
    	--grid-cols: 3.5; 
    }
}
.livescore-menu .livescorelist-content::-webkit-scrollbar { 
	display: none; 
}

/* Live Sport List */
/* ====== Card Container ====== */
.match-card {
    background: var(--CARD_1_BG);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    margin-right: 12px;
    color: var(--TXT_COLOR_1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1);
    cursor: pointer;
    transform: translateY(-3px);
}

.livescorelist-content > div:last-child .match-card {
    margin-right: 0;          /* remove margin from last card */
}

/* ====== Card Header Section ====== */
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--TXT_COLOR_1);
    margin-bottom: 14px;
}

.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);
}

.match-header .league-logo {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    margin-bottom: 1px;
}

.match-header .season {
    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);
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--STATUS_APPROVED_COLOR);
    margin-right: 5px;
    margin-bottom: 1px;
}

/* ====== Team Logos + Score Section ====== */
.teams-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    gap: 40px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;           /* makes left and right equal width */
}

.match-card .team-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 6px;
}

.team-name {
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

.score-box-center {
    flex: 0 0 auto;
    text-align: center;
    font-size: var(--SECTION_HEADER_LARGE_FONT_SIZE);
    font-weight: var(--MED_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
    margin: 0 10px;
}

/* ====== Card Footer Section ====== */
.match-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.match-date-box,
.elapsed-box {
    flex: 1;
    background: var(--CARD_2_BG);
    padding: 8px 10px 8px 16px;
    border-radius: 10px;
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--FORM_TXT_COLOR);
}

.match-footer .label {
	font-weight: var(--LIGHT_FONT_WEIGHT);
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    color: var(--TXT_COLOR_4);
    margin-bottom: 4px;
}

.match-footer .value {
    font-size: var(--SUBBODY_TXT_FONT_SIZE);
    font-weight: var(--LIGHT_FONT_WEIGHT);
    color: var(--TXT_COLOR_1);
}

/* ====== Responsive Fix ====== */
@media (max-width: 768px) {
    .livescorelist-content .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Live score control */
.livescore-controls { 
	display: flex; 
	gap: 8px; 
}

.livescore-scroll { 
	width: 42px; 
	height: 40px; 
	border-radius: 10px; 
	background: var(--THIRD_BTN_BG); 
	color: var(--THIRD_BTN_COLOR); 
	display: flex; 
	align-items: center; 
	justify-content: center; 
	cursor: pointer; 
	z-index: 1; 
	opacity: .9; 
}

.livescore-scroll:hover { 
	filter: var(--THIRD_BTN_HOVER_BG);
}

.livescore-scroll.disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* Preloader spinner */
.livescore-preloader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    color: var(--BODY_TXT_COLOR);
    transition: opacity 0.3s ease-out;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--PRIMARY_INACTIVE_BTN_BG);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.livescore-preloader .spinner {
    border-top-color: var(--TXT_COLOR_3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Game card animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.livescore_content {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.livescore_content .gamelist_name,
.livescore_content .gamelist_providername {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.livescore_content:nth-child(1) {
	animation-delay: 0.05s; 
}

.livescore_content:nth-child(2) { 
	animation-delay: 0.1s; 
}

.livescore_content:nth-child(3) { 
	animation-delay: 0.15s; 
}

.livescore_content:nth-child(4) { 
	animation-delay: 0.2s; 
}

.livescore_content:nth-child(5) { 
	animation-delay: 0.25s; 
}

.livescore_content:nth-child(6) { 
	animation-delay: 0.3s; 
}

.livescore_content:nth-child(7) { 
	animation-delay: 0.35s; 
}

.livescore_content:nth-child(8) { 
	animation-delay: 0.4s; 
}

.livescore_content:nth-child(9) { 
	animation-delay: 0.45s; 
}

.livescore_content:nth-child(10) { 
	animation-delay: 0.5s; 
}

.livescore_content:nth-child(11) { 
	animation-delay: 0.55s; 
}

.livescore_content:nth-child(12) {
	animation-delay: 0.6s; 
}

.livescore_content:nth-child(13) { 
	animation-delay: 0.65s; 
}

.livescore_content:nth-child(14) { 
	animation-delay: 0.7s; 
}

.livescore_content:nth-child(15) { 
	animation-delay: 0.75s; 
}

.livescore_content:nth-child(16) { 
	animation-delay: 0.8s; 
}

.livescore-preloader.fade-out {
    opacity: 0;
}

/* Search Modal */
.search-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(2px);
}

.search-modal-content {
	margin: 10% auto;
	border-radius: 10px;
	width: 655px;
	height: 429px;
	color: white;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	background-color: var(--MODAL_BG);
}

.search-modal-header {
	background-color: var(--MODAL_HEADER_BG);
	display: flex;
	justify-content: flex-end;
	position: relative;
	align-items: center;
	border-bottom: 1px solid #333;
	width: 655px;
	height: 68px;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
}

.search-modal-header h3{
	font-family: var(--SECONDARY_FONT_FAMILY) !important;
	font-size: var(--HEADER_FONT_SIZE) !important;
	font-weight: var(--MED_FONT_WEIGHT) !important;
	line-height: 100% !important;
    letter-spacing: 0.54px !important;
    width: 65px !important;
    height: 23px !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.livescore-search .close-btn {
	background: var(--MODAL_CLOSE_BTN_BG);
	border: none;
	color: var(--MODAL_CLOSE_BTN_COLOR);
	font-size: 24px;
	cursor: pointer;
	width: 40px;
	height: 38px;
	border-radius: 10px;
	margin-right: 3%;
}

.livescore-search .search-modal-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 0;
	height: 361px;
}

.livescore-search  .form-group {
	display: flex;
	flex-direction: column;
	width: 565px;
	margin-bottom: 35px;
}

.livescore-search label {
	font-size: var(--BODY_TXT_FONT_SIZE);
	color: var(--TXT_COLOR_1);
	font-weight: var(--MED_FONT_WEIGHT);
	font-family: var(--PRIMARY_FONT_FAMILY) !important;
}

/* Input Wrapper */
.score-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--INPUT_BG);
	border: var(--INPUT_BORDER);
	border-radius: 10px;
	width: 565px;
	height: 42px;
	padding: 0 16px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.date-input-label {
    background: var(--INPUT_BG);
    color: var(--TXT_COLOR_1);
    border: none;
    outline: none;
}

.date-input-label:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Remove native calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: 0;
	cursor: pointer;
	position: absolute;
	right: 10px;
	width: 20px;
	height: 20px;
}

/* Icons */
.input-icon-left {
	width: 24px;
	height: 24px;
	margin-right: 12px;
}

.input-icon-right {
	position: absolute;
	right: 10px;
	color: var(--TXT_COLOR_1);
	font-size: 12px;
	pointer-events: none;
	background-color: var(--THIRD_BTN_BG);
	padding: 10px;
    border-radius: 5px;
}

/* Apply Button */
.modal-actions {
	display: flex;
	justify-content: center;
	padding-top: 30px;
}

.livescore-search .btn-search {
	width: 218px;
	height: 44px;
	background: var(--PRIMARY_BTN_BG);
	border: none;
	border-radius: 10px;
	padding: 13px 23px 13px 13px;
	gap: 10px;
	color: var(--MODAL_TXT_COLOR);
	
	font-family: var(--PRIMARY_FONT_FAMILY);
	font-size: var(--BUTTON_LARGE_FONT_SIZE);
	font-weight: var(--MED_FONT_WEIGHT);
	line-height: 100%;
    letter-spacing: 0;
}


/* --- Live Dot Base --- */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Status Colors --- */
.live-dot.FT {
    background-color: var(--STATUS_APPROVED_COLOR); /* Green for Finished */
}

.live-dot.NS {
    background-color: var(--TXT_COLOR_4); /* Gray for Not Started */
}

/* ===== LiveScore Modal ===== */
.ls-modal {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
}

.ls-modal.active {
    display: flex;
    pointer-events: auto;
}

/* --- Modal Background Panel --- */
.ls-modal-panel {
    background: var(--CARD_1_BG);
    border-radius: 10px;
    width: 780px;
    max-height: 655px;
    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;
}

#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 */
}
