/* Global container */
.api-football-widget {
    font-family: sans-serif;
    font-size: 14px;
    margin: 1em 0;
}

/* Tables for fixtures, live scores, odds, etc. */
.api-football-table {
    width: 100%;
    border-collapse: collapse;
	font-size: 14px!important;
    margin-bottom: 1em;
}

.api-football-table th,
.api-football-table td {
    border: 0px solid #ccc;
    padding: 8px 10px!important;
    text-align: left;
    vertical-align: middle;
}

.api-football-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

/* Team name and logo alignment */
.api-football-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-football-team-cell img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* League standings table */
.api-football-standings-logo {
    width: 32px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Team info box */
.api-football-team-box {
    display: flex;
    justify-content: space-between;
    border: 1px solid #ccc;
    padding: 16px;
    margin-top: 10px;
    background: #fafafa;
    border-radius: 8px;
}

.api-football-team-box-left {
    flex: 0 0 40%;
}

.api-football-team-box-right {
    flex: 0 0 55%;
}

/* H2H Modal styling */
.api-football-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* allow scroll */
  background-color: rgba(0, 0, 0, 0.5);
}

.api-football-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;           /* Limit modal height */
  overflow-y: auto;           /* Enable vertical scroll */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
}

.api-football-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 20px;
    cursor: pointer;
}


.api-football-modal-close {
  float: right;
  font-size: 22px;
  cursor: pointer;
}

.api-football-h2h-table div {
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
}
.api-football-date-header {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
}

.api-football-fixture-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.api-football-fixture-row:hover {
  background-color: #f0f0f0;
}

.api-football-time-cell {
  width: 60px;
  text-align: center;
  font-weight: bold;
}

.api-football-date-header {
    margin-top: 1.5em;
    font-size: 1.2em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
}

.api-football-odds-row {
    cursor: pointer;
}

.api-football-odds-cell {
    text-align: center;
}

.api-football-odd-box {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    border-radius: 4px;
    background: #f1f1f1;
    font-weight: bold;
    border: 1px solid #ccc;
}

.api-football-bet-btn {
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none!important;
}

.api-football-predict {
  margin-top: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 5px;
}

.api-football-predict-options button {
  margin-right: 10px;
  padding: 8px 12px;
  border: none;
  background: #eee;
  cursor: pointer;
  border-radius: 3px;
  font-weight: bold;
}

.api-football-predict-options button:hover {
  background: #ddd;
}

.api-football-odd-box {
  display: inline-block;
  padding: 5px 10px;
  background: #e7f1ff;
  border-radius: 3px;
  margin-right: 5px;
  font-weight: bold;
}

.api-football-prediction-ui {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    text-align: center;
}

.api-football-predict-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #222;
}

.api-football-predict-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.api-football-predict-buttons button.api-football-pick {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    background: #0073aa;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    min-width: 100px;
}

.api-football-predict-buttons button.api-football-pick:hover {
    background: #005a8c;
}

.api-football-bet-section {
    margin-top: 15px;
    font-size: 14px;
}

.api-football-bet-section p {
    margin-bottom: 10px;
}

.api-football-bet-section a.api-football-bet-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.api-football-odds-header h4 {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
   /* margin-top: 20px;
    margin-bottom: 10px; */
}

.api-football-odds-display {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.api-football-odds-display .api-football-odd-box {
    background-color: #e7f1ff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    border: 1px solid #ccc;
    color: #000;
    min-width: 50px;
    text-align: center;
}

.api-football-odd-pair {
    display: inline-block;
    text-align: center;
    margin-right: 8px;
}

.api-football-odd-label {
/*  display: block; */
    font-size: 12px;
    margin-bottom: 2px;
}

.api-football-odd-box {
    display: inline-block;
    padding: 4px 6px;
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
	font-size: 12px;
}

.api-football-odd-box {
    background: #f0f0f0;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

/* Scoped ONLY to odds-widget */
.api-football-widget.odds-widget .api-football-table td {
    vertical-align: middle;
}

/* Fix for team name + logo cell */
.api-football-widget.odds-widget .api-football-team-cell {
    display: table-cell;
    white-space: nowrap;
    vertical-align: middle;
}

/* Ensure image and text are vertically centered */
.api-football-widget.odds-widget .api-football-team-cell img {
    vertical-align: middle;
    margin: 0 4px;
}

/* Optional: Align odds boxes and labels properly in odds cell */
.api-football-widget.odds-widget .api-football-odds-cell {
    vertical-align: middle;
    text-align: center;
}

/* Align the Bet Now button cell */
.api-football-widget.odds-widget .api-football-bet-btn {
    vertical-align: middle;
}

/* PREDICTIONS CONFIDENCE METER */
.confidence-meter {
    position: relative;
    background: #e0e0e0;
    height: 8px;
    width: 100px;
    border-radius: 4px;
    margin-top: 4px;
}

.confidence-bar {
    background: #0073aa;
    height: 8px;
    border-radius: 4px;
}

.confidence-label {
    font-size: 11px;
    margin-left: 6px;
    display: inline-block;
    color: #333;
}

.api-football-odds-cell {
    white-space: nowrap;
    overflow-x: auto;
/*    display: block; */
    max-width: 100%;
    padding: 5px 0;
}

/* PREDICTIONS STATS MODAL */
.api-football-stats-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.api-football-stats-modal-content {
    background: white;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
}

.api-football-stats-modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.api-football-stats-modal-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.api-football-stats-modal-stats-table th,
.api-football-stats-modal-stats-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.api-football-stats-btn {
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 13px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.api-football-stats-btn:hover {
    background: #005a8c;
}

.api-football-stats-row td {
    background: #f9f9f9;
    padding: 12px;
}

.api-football-stats-toggle {
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 13px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.api-football-stats-toggle:hover {
    background: #005a8c;
}

.api-football-button-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.api-football-bet-btn,
.api-football-stats-toggle {
    white-space: nowrap;
}

/* MOBILE FRIENDLY */
@media (max-width: 768px) {
  /* EXCLUDE standings */
  .api-football-table:not(.api-football-standings-container .api-football-table),
  .api-football-table:not(.api-football-standings-container .api-football-table) thead,
  .api-football-table:not(.api-football-standings-container .api-football-table) tbody,
  .api-football-table:not(.api-football-standings-container .api-football-table) th,
  .api-football-table:not(.api-football-standings-container .api-football-table) td,
  .api-football-table:not(.api-football-standings-container .api-football-table) tr {
      display: block;
      width: 100%;
  }

  .api-football-table:not(.api-football-standings-container .api-football-table) thead {
      display: none;
  }

  .api-football-table:not(.api-football-standings-container .api-football-table) tr {
      margin-bottom: 1rem;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fff;
      padding: 10px;
  }

  .api-football-table:not(.api-football-standings-container .api-football-table) td {
      text-align: center;
      position: relative;
      border: none;
      border-bottom: 1px solid #eee;
      white-space: normal;
      word-wrap: break-word;
  }
	
  .api-football-h2h-table .api-football-table td {
    text-align: left !important;
    padding-left: 40% !important;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: normal;
    word-wrap: break-word;
  }

  .api-football-h2h-table .api-football-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
    width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
	
	.api-football-widget.predictions-widget .api-football-table  td {
      text-align: left;
      padding-left: 40% !important;
      position: relative;
      border: none;
      border-bottom: 1px solid #eee;
      white-space: normal;
      word-wrap: break-word;
  }
	
  .api-football-table:not(.api-football-standings-container .api-football-table) td::before {
      content: attr(data-label);
      position: absolute;
      left: 10px;
      top: 10px;
      white-space: nowrap;
      font-weight: bold;
      color: #333;
      width: 45%;
      overflow: hidden;
      text-overflow: ellipsis;
  }

  .api-football-table:not(.api-football-standings-container .api-football-table) td:last-child {
      border-bottom: none;
  }
}


/* NARROW COLUMN FRIENDLY */
/* Optional wrapper for column-awareness */
.api-football-widget-container {
    width: 100%;
    box-sizing: border-box;
}

/* Apply narrow styles if the class is present */
.api-football-widget-container.narrow-view .api-football-widget {
    width: 100%;
}

/* Support nesting .api-football-widget in container */
.api-football-widget-container.narrow-view .api-football-widget .api-football-table,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table thead,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table tbody,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table th,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table td,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table tr {
    display: block;
    width: 100%;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table thead {
    display: none;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td {
    text-align: left;
    padding-left: 40% !important;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: normal;
    word-wrap: break-word;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
    width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td:last-child {
    border-bottom: none;
}

.api-football-widget-container.narrow-view .api-football-widget .hide-on-small {
    display: none !important;
}

/* Optional wrapper for column-awareness */
.api-football-widget-container {
    width: 100%;
    box-sizing: border-box;
}

/* Apply narrow styles if the class is present */
.api-football-widget-container.narrow-view .api-football-widget {
    width: 100%;
}

/* Support nesting .api-football-widget in container */
.api-football-widget-container.narrow-view .api-football-widget .api-football-table,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table thead,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table tbody,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table th,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table td,
.api-football-widget-container.narrow-view .api-football-widget .api-football-table tr {
    display: block;
    width: 100%;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table thead {
    display: none;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td {
    text-align: left;
    padding-left: 22% !important;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: normal;
    word-wrap: break-word;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
    width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.api-football-widget-container.narrow-view .api-football-widget .api-football-table td:last-child {
    border-bottom: none;
}

.api-football-widget-container.narrow-view .api-football-widget .hide-on-small {
    display: none !important;
}

/*PREVIEW PLACEHOLDER*/
.topbets-preview-placeholder {
	border: 1px solid #ccc;
	padding: 10px;
	background: #fafafa;
	border-radius: 4px;
	max-width: 100%;
}

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

.topbets-preview-placeholder td {
	padding: 6px 10px;
	border-bottom: 1px solid #ddd;
}

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

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

@media (max-width: 768px) {
  .wp-block-column,
  .api-football-widget-container,
  .api-football-widget {
    box-sizing: border-box;
    max-width: 100%;
    width: 100% !important;
    overflow-x: hidden;
    margin: 0 auto !important;
    padding: 0 10px;
  }

  .api-football-table-wrapper {
    overflow-x: auto;
    width: 100%;
  }

  .api-football-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    box-sizing: border-box;
  }

  .api-football-table td,
  .api-football-table th {
    word-wrap: break-word;
    white-space: normal;
  }

  /* Prevent image overflow */
  .api-football-team-cell img {
    max-width: 100%;
    height: auto;
  }
}