/**
 * Mobile-first layout rebuild (max-width 991.98px).
 * Full-width vertical flow; fixture tables replaced by cards in Blade (d-lg-none / d-lg-block).
 */

.sport-table__row.league-filtered {
  display: none !important;
}

@media (max-width: 991.98px) {
  /* Hard hide desktop fixture table below lg — no min-width leakage if utility classes fail */
  .cafetal777-layout .sport-table-desktop {
    display: none !important;
  }

  .cafetal777-layout .sport-table-wrap--creative {
    overflow-x: visible !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* Match cards (replaces wide table) */
  .cafetal777-layout .sport-match-cards--hub {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .sport-match-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--ct777-border, rgba(255, 255, 255, 0.1));
    background: var(--ct777-dark-soft, #111827);
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .sport-match-card.sport-table__row--today {
    border-color: rgba(0, 212, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.12);
  }

  .sport-match-card__block--teams {
    padding: 10px 12px 8px;
    min-width: 0;
  }

  .sport-match-card__block--meta {
    padding: 6px 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
  }

  .sport-match-card__block--odds {
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0;
  }

  .sport-match-card__teams {
    min-width: 0;
  }

  .sport-match-card__teams {
    display: block;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    word-break: break-word;
  }

  .sport-match-card__vs {
    display: inline;
    font-weight: 600;
    opacity: 0.65;
    padding: 0 0.2em;
    font-size: 0.85em;
  }

  .sport-match-card__datetime {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    color: rgba(232, 237, 245, 0.65);
  }

  .sport-match-card__live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--ct777-accent, #00d4ff);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .sport-match-card__live svg.lucide {
    width: 12px;
    height: 12px;
  }

  .sport-match-card__league {
    font-size: 0.7rem !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sport-match-card__odds {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .sport-match-card__odd.oddBtn {
    flex: 1 1 0;
    min-width: 0 !important;
    min-height: 44px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .sport-match-card__na {
    flex: 1 1 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    font-size: 0.9rem;
  }

  .sport-match-card__more {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--ct777-border, rgba(255, 255, 255, 0.12));
    background: rgba(0, 0, 0, 0.2);
    color: var(--ct777-accent, #00d4ff);
  }

  .sport-match-card.league-filtered {
    display: none !important;
  }

  /* Hub: stack header, tabs, toolbar — full width, less bulk */
  .cafetal777-layout .sport-hub--creative {
    margin-left: 0;
    margin-right: 0;
    border-radius: 10px;
  }

  .cafetal777-layout .sport-hub__header--creative {
    padding: 8px 10px !important;
  }

  .cafetal777-layout .sport-hub__title {
    font-size: 0.95rem !important;
  }

  .cafetal777-layout .sport-hub__tabs--pills {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  .cafetal777-layout .sport-hub__tabs--pills .sport-hub__tab {
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px !important;
    padding: 10px 12px !important;
  }

  .cafetal777-layout .sport-hub__toolbar {
    flex-direction: column;
    align-items: stretch !important;
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  .cafetal777-layout .sport-hub__sport-select {
    width: 100%;
  }

  .cafetal777-layout .sport-hub__content {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
  }

  .cafetal777-layout .sport-hub__sidebar {
    order: 2;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .cafetal777-layout .sport-hub__main {
    order: 1;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Main column: never reserve space for slip (slip is position:fixed in responsive-new) */
  .cafetal777-layout .sports-body {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden;
  }

  /* Single-column main: slip is overlay only (position fixed in responsive-new) */
  .cafetal777-layout main.home-page,
  .cafetal777-layout .home-page {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .cafetal777-layout .home-page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: hidden;
    max-width: 100vw;
  }

  .cafetal777-layout .home-page > .betslip {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
  }

  .cafetal777-layout .betslip {
    box-sizing: border-box;
  }

  /* Vertical rhythm between hub sections */
  .cafetal777-layout .betting-body--hub {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }

  .cafetal777-layout .sport-hub-section-wrap {
    margin-bottom: 0 !important;
  }

  .cafetal777-layout .sport-hub-section-wrap + .sport-hub-section-wrap {
    margin-top: 0.5rem;
  }

  .cafetal777-layout .top-sticky {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Bet slip line items: clear stacked sections, no cramped noise */
  .cafetal777-layout .betslip-item {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    gap: 0;
  }

  .cafetal777-layout .betslip-item-header {
    padding: 10px 12px !important;
    flex-shrink: 0;
  }

  .cafetal777-layout .betslip-item-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .cafetal777-layout .betslip-item-teams {
    padding: 10px 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .cafetal777-layout .betslip-item-market {
    margin-top: 0 !important;
    padding: 10px 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .cafetal777-layout .betslip-item-stake {
    margin-top: 0 !important;
    padding: 10px 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .cafetal777-layout .betslip-item-return {
    margin-top: 0 !important;
    padding: 10px 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 0 0;
  }
}
