/* --- Z-Index Fixes --- */
/* Asegura que el Login esté sobre el buscador */
#loginModal {
  z-index: 10000 !important;
}

.modal-backdrop+.modal-backdrop {
  z-index: 9999 !important;
}

.smart-search-trigger {
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
}


.smart-search-trigger span {
  color: #ffffff;
}

.smart-search-trigger i {
  color: #ffb306;
  padding-right: 0px !important;
}

/* --- Modal Base --- */
.smart-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s;
}

.smart-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 10px;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  min-height: 400px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* --- Modal Components --- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  text-transform: uppercase;
  flex-grow: 1;
}

.close-btn {
  color: #000;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: #e0e0e0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-btn:hover {
  background: #ccc;
}

.modal-search-bar {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  background: #f9f9f9;
}

.modal-search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 16px;
  padding: 5px 10px;
  outline: none;
  color: #333;
}

/* --- States --- */
.modal-empty-state {
  text-align: center;
  margin-top: 60px;
  color: #888;
}

.modal-empty-state .icon-circle {
  font-size: 40px;
  color: #aaa;
  margin-bottom: 15px;
}

.modal-empty-state p {
  font-size: 14px;
}

.search-results-container {
  margin-top: 20px;
  display: none;
  padding-bottom: 20px;
  overflow: auto;
  max-height: 30.5em;
}

.search-status-msg {
  text-align: center;
  padding: 20px;
  color: #666;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


@media (max-width: 1023px) {
  #games-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #games-container[style*="block"] {
    display: grid !important;
  }

  #games-container > * {
    min-width: 0;
    max-width: 100%;
  }
}

/* --- Tabs --- */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #eee;
  margin-bottom: 15px;
}

.modal-tab {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  text-transform: uppercase;
}

.modal-tab i {
  margin-right: 6px;
}

.modal-tab:hover {
  color: #333;
}

.modal-tab.active {
  color: #000;
  border-bottom-color: #ffb306;
}

/* --- Tab panes --- */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* --- Resultados de deportivas --- */
.sports-results-container {
  display: flex;
  flex-direction: column;
}

.sports-result-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s;
}

.sports-result-item:hover {
  background-color: #f5f5f5;
  text-decoration: none;
  color: inherit;
}

.sports-result-item:last-child {
  border-bottom: none;
}

.sports-result-name {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.sports-result-name span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sports-result-live {
  flex-shrink: 0;
  background: #e63946;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sports-result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #888;
}

.sports-result-sport i {
  margin-right: 4px;
  color: #aaa;
}

.sports-result-sep {
  color: #ccc;
}

.sports-result-league {
  color: #999;
}

@media (max-width: 767px) {
  .lateralBannerMobileMain {
    margin: 0;
    max-width: 100%;
  }

  .bm-mobile .midMenu {
    display: block !important;
    column-count: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
  }

  .bm-mobile .midMenu li {
    display: inline-block !important;
    width: 100%;
    border-right: none !important;
    break-inside: avoid-column;
  }

  .smart-modal {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .smart-modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    min-height: 100%;
  }

  .modal-tab {
    font-size: 13px;
    padding: 10px 4px;
  }
}