/* Общи стилове */

.left-panel {
  position: relative;
  z-index: 2;
}

.country-filter {
  position: relative;
  z-index: 2;
}

/* Стил за минутата */
.match-minute {
  color: #e74c3c;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
}

.match-score {
  font-size: 15px;
  text-align: center;
  line-height: 1.2;
}

.match-score span {
  font-weight: normal;
  opacity: 1;
  transition: all 0.3s ease;
}

.score-leading {
  font-weight: bold;
  color: #000;
}

.score-trailing {
  color: #999;
}

        table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,0.05); }
        th, td { padding: 10px; border-bottom: 1px solid #ddd; text-align: left; }
        th { background: #3b2f61; color: #fff; }
        tr:hover { background: #f9f9f9; }
        .logo { height: 20px; vertical-align: middle; margin-right: 6px; }
        h2 { color: #f29020; }
        .locked {
  color: #999;
  font-style: italic;
  font-size: 0.9em;
  padding: 4px 6px;
  background-color: #e6f5ea;
  border-radius: 5px;
}
        .market { font-weight: bold; color: #3b3937; }
        .market-select { padding: 6px 10px; font-size: 14px; border-radius: 5px; border: 1px solid #ccc; }
        .market-select-wrapper { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 10px; }
		.pagination { display: flex; justify-content: center; margin-top: 25px; gap: 6px; }
        .pagination a { background-color: #3b2f61; color: white; padding: 8px 14px; text-decoration: none; border-radius: 6px; font-weight: bold; transition: background-color 0.2s ease; }
        .pagination a:hover { background-color: #5b4090; }
        .pagination a.active { background-color: #7c5cc4; pointer-events: none; }
        .percent-box { display: inline-block; padding: 6px 12px; border-radius: 8px; font-weight: bold; color: white; min-width: 50px; text-align: center; }
        td.info a { text-decoration: none; font-weight: bold; color: #3b3937; }
		td.info { text-align: center; vertical-align: middle; }
        td.info img { vertical-align: middle; }
		.live-dot { height: 10px; width: 10px; background-color: #e74c3c; border-radius: 50%; display: inline-block; margin-right: 6px; animation: pulse 1s infinite; vertical-align: middle; }
        @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }
        .live-text { color: #e74c3c; font-weight: bold; }
		th.sortable {
    cursor: pointer;
    position: relative;
}
th.sortable.asc::after {
    content: " ▲";
    font-size: 12px;
}
th.sortable.desc::after {
    content: " ▼";
    font-size: 12px;
}

.login {
    margin-bottom: 20px;
}

#login-button {
  gap: 8px;
  margin-bottom: 10px;
}

.login button
.login-btn {
    padding: 8px 14px;
    border: none;
    background: #e6f5ea;
    cursor: pointer;
    border-radius: 6px;
	text-decoration: none;
    font-weight: 600;
    color: #2a5934;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.09);
    transition: background 0.25s, color 0.25s, transform 0.2s;
}

.login-btn:hover {
    background-color: #c2e8cd;
    color: #1d3f26;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.login-btn.active {
    background-color: #2ecc71;
    color: white;
    box-shadow: 0 0 0 2px #2ecc71aa;
}
		
		/* Бутоните за дати */
.date-filters {
    margin-bottom: 20px;
}

#date-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.date-filters button,
.date-filters a.date-btn {
    padding: 8px 14px;
    border: none;
    background: #e6f5ea;
    cursor: pointer;
    border-radius: 6px;
	text-decoration: none;
    font-weight: 600;
    color: #2a5934;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.09);
    transition: background 0.25s, color 0.25s, transform 0.2s;
}

.date-filters a.date-btn:hover {
    background-color: #c2e8cd;
    color: #1d3f26;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.date-filters a.date-btn.active {
    background-color: #2ecc71;
    color: white;
    box-shadow: 0 0 0 2px #2ecc71aa;
}

.fixtures-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.left-panel {
  width: 200px;
  border-right: 1px solid #ccc;
  padding-right: 10px;
  padding-top: 10px;
  flex-shrink: 0;
}

.right-panel {
  flex-grow: 1;
  padding-left: 20px;
  }

.country-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.country-filter button {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 0.2s;
}

.country-filter button:hover {
  background-color: #eaeaea;
}

.country-filter img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
}
.filter-title {
  background-color: #3b2f61;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  cursor: default;
  user-select: none;
}
.match-status {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    color: white;
    min-width: 32px;
    text-align: center;
    margin-bottom: 3px;
}
.status-NS    { background-color: #3498db; } /* син */
.status-1H,
.status-HT,
.status-2H    { background-color: #d73030; } /* оранжево */
.status-LIVE  { background-color: #d73030; } /* червено */
.status-P1  { background-color: #d73030; } /* червено */
.status-P2  { background-color: #d73030; } /* червено */
.status-P3  { background-color: #d73030; } /* червено */
.status-OT  { background-color: #d73030; } /* червено */
.status-P  { background-color: #d73030; } /* червено */
.status-INT  { background-color: #d73030; } /* червено */
.status-BT  { background-color: #d73030; } /* червено */
.status-FT,
.status-AET,
.status-PEN,
.status-AWD   { background-color: #2ecc71; } /* зелено */
.status-CANC,
.status-PST   { background-color: #7f8c8d; }
.status-TBD,
.status-ABD   { background-color: #7f8c8d; } /* сиво */
/* Мигаща червена точка */
.live-minute {
  margin-right: 5px;
  font-weight: 500;
  color: #333;
}

.live-label {
  background-color: #d73030;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: red;
  border-radius: 50%;
  margin-right: 5px;
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.status-SOON {
  background-color: orange;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}
.status-SOON .starts-in {
  font-size: 0.9em;
  font-weight: normal;
  display: block;
  margin-top: 2px;
}
.section-divider td {
  background-color: #e6f5ea;
  font-weight: bold;
  padding: 8px 12px;
  text-align: left;
  border-top: 2px solid #ccc;
}

.section-label {
  font-size: 14px;
  padding-left: 10px;
  border-left: 4px solid #f29020;
}
.hour-divider td {
  background-color: #fff8e1;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-top: 1px dashed #f29020;
}

.section-hour {
  padding-left: 12px;
}

.match-info {
  text-align: center;
}
.match-info-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.match-info-link:hover {
  background-color: rgba(255,165,0,0.1); /* лек ефект при hover */
}

.pagination-controls {
  margin-top: 15px;
  text-align: center;
}
.pagination-controls button {
  padding: 5px 10px;
  margin: 0 3px;
  border: none;
  background-color: #eee;
  cursor: pointer;
  border-radius: 5px;
}
.pagination-controls button.active {
  background-color: #3498db;
  color: white;
}
.pagination-controls button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
#pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
}

.page-btn.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}
.show-all-button {
  padding: 10px 20px;
  background-color: #f29020;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.show-all-button:hover {
  background-color: #d97900;
}

.h2h-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px;
  background: #f9f9f9;
  border-bottom: 2px solid #ddd;
  text-align: center;
  flex-wrap: wrap;
}

.team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 30%;
}

.h2h-header-extended {
  display: grid;
  grid-template-columns: auto 40px 1fr 40px auto;
  gap: 10px;
  align-items: center;
  padding: 15px;
  background: #f9f9f9;
  border-bottom: 2px solid #ddd;
  text-align: center;
}

.h2h-main {
  max-width: 100%;
  width: 100%;
}

.h2h-main {
  max-width: 100%;
  flex: 1 1 70%;
  min-width: 300px;
}


.team-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-right {
  flex-direction: row-reverse;
}

.team-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.team-right .team-block {
  align-items: flex-end;
}


.match-info {
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.score-box {
  font-size: 22px;
  font-weight: bold;
  min-width: 32px;
}

.status-live {
  color: white;
  font-weight: bold;
  font-size: 13px;
}

.status-finished {
  color: #28a745;
  font-weight: bold;
  font-size: 13px;
}

.league-flag {
  width: 20px;
  height: 14px;
  margin-right: 5px;
  vertical-align: middle;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.form-and-name {
  align-items: flex-end;
}

.logo-container {
  flex-shrink: 0;
}

.standings-section {
  margin-top: 20px;
}

.standings-wrapper {
  overflow-x: auto;
  width: 100%;
}

.standings-table {
  min-width: 600px;
}

.form-and-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-badges {
  display: flex;
  gap: 5px;
  margin: 8px 0;
  justify-content: center;
}

.badge {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  font-size: 14px;
}

.badge.win {
  background-color: #28a745; /* зелено */
}

.badge.draw {
  background-color: #ffc107; /* жълто */
}

.badge.loss {
  background-color: #dc3545; /* червено */
}
.badge.empty {
  background-color: #ccc;
  color: #fff;
}

.h2h-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.h2h-main {
  flex: 3;
}

.h2h-sidebar {
  flex: 1;
  max-width: 500px;
  background: #fdfdfd;
  padding: 10px;
  border-left: 1px solid #ccc;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.h2h-sidebar .standings-table {
  min-width: 0 !important;
  width: 100%;
}

.standings-table th,
.standings-table td {
  padding: 6px 8px;
  border: 1px solid #ccc;
  text-align: center;
}

.standings-table .highlight {
  background: #ffeeba;
  font-weight: bold;
}

.form {
  font-weight: bold;
  margin-top: 5px;
}

.h2h-block {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  margin-top: 25px;
  border-radius: 8px;
}

.h2h-summary {
  display: flex;
  justify-content: space-around;
  margin-bottom: 15px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.h2h-table {
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}


.h2h-direct-table th,
.h2h-direct-table td {
  padding: 6px 8px; /* Намален padding */
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.h2h-table th:nth-child(2),
.h2h-table td:nth-child(2) {
  width: 60%;
  text-align: left;
}


.h2h-head2head {
  margin-top: 0px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
}

.dot-win {
  background-color: #28a745; /* зелено */
}

.dot-draw {
  background-color: #ffc107; /* жълто */
}

.dot-loss {
  background-color: #dc3545; /* червено */
}

.h2h-progress-bar {
  display: flex;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
  text-align: center;
  font-weight: bold;
}

.h2h-progress-bar .bar {
  padding: 4px 0;
  color: #fff;
}

.h2h-progress-bar .home {
  background-color: green;
}

.h2h-progress-bar .draw {
  background-color: gold;
  color: #000;
}

.h2h-progress-bar .away {
  background-color: #dc3545;
}

.latest-matches-block {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
}

.match-filters {
  margin-bottom: 10px;
}

.match-filter {
  padding: 5px 10px;
  border: none;
  background: #eee;
  cursor: pointer;
  border-radius: 5px;
  margin-right: 5px;
  font-weight: bold;
}

.match-filter.active {
  background: #f29020;
  color: white;
}

.latest-matches-table {
  width: 100%;
  border-collapse: collapse;
}

.latest-matches-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.match-badge {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  font-size: 14px;
}

.match-badge.win { 
  background-color: #4CAF50;
  }
  
.match-badge.draw { 
  background-color: #ff9800;
  }
  
.match-badge.loss { 
  background-color: #f44336;
  }

.hidden {
  display: none;
}

.latest-matches {
  max-width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}

.match-row.hidden { display: none; }

  .match-filters button {
    margin-right: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
  }
  
  .away-matches .away-style {
  border: 1px solid #ccc;
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.away-matches .away-style th,
.away-matches .away-style td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}
.away-matches .away-style tr:nth-child(even) {
  background-color: #f9f9f9;
}
.away-matches .away-style tr:hover {
  background-color: #f1f1f1;
}

.away-matches .match-badge.win {
	width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  background-color: #4CAF50;
}
.away-matches .match-badge.loss {
	width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  background-color: #f44336;
}
.away-matches .match-badge.draw {
	width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  background-color: #ff9800;
}

.match-filter-away button {
    margin-right: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
  }
  
  .match-filter-away.active {
  background: #f29020;
  color: white;
}


tr.ft-match {
  display: table-row;
}
body.hide-finished tr.ft-match {
  display: none;
}

.hide-finished .ft-match {
  display: none;
}

.toggle-finished-btn {
  margin: 10px auto;
  display: block;
  padding: 6px 12px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}
.m2-markets{
  display:grid;
  grid-template-columns: 1fr;
  gap:8px;
}
.m2-mkt-title{
  font-size:12px;
  font-weight:600;
  color:#667085;
  margin-bottom:4px;
  line-height:1.1;
}
@media (min-width: 520px){
  .m2-markets{ grid-template-columns: repeat(3, 1fr); }
}


/* Скриваме колони, които не са от критично значение на малки екрани */
@media (max-width: 768px) {
  #fixtures-table thead th:nth-child(2),  /* Country */
  {
    display: none;
  }

  #fixtures-table tbody td:nth-child(2),
  {
    display: none;
  }

  /* Responsive table wrapper scroll */
  .fixtures-wrapper .right-panel {
    overflow-x: auto;
  }

@media (max-width: 768px) {
  .fixtures-wrapper {
    display: flex !important; /* или flex с column, ако е flexbox */	
    flex-wrap: wrap;
  }

  .left-panel {
    display: none !important;
  }

  .right-panel {
    width: 100% !important;
  }
  
  .percent-box { display: inline-block; padding: 3px 6px; border-radius: 4px; font-weight: bold; color: white; min-width: 40px; text-align: center; }
  
  table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  min-width: 300px !important;
}
       
}

  @media (max-width: 768px) {

  #fixture-search {
    max-width: 100%;
    width: 100%;
    margin-bottom: 10px;
  }

  .market-select-wrapper {
    width: 100%;
    margin-top: 10px;
    text-align: center;
	display: flex;
    flex-wrap: wrap;
  }

  #fixtures-table th,
  #fixtures-table td {
    font-size: 13px;
    padding: 4px 6px;
	display: box;
    flex-wrap: wrap;
  }



  .match-status {
    font-size: 12px;
  }

  .match-score span {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .h2h-header-extended {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    text-align: center;
  }

  .h2h-header-extended > * {
    width: 100%;
  }
}




