/* =========================================
   TOGEL MARKETS (DESKTOP + MOBILE 2-COLUMN CARDS)
   ========================================= */
.pasaran-preview-section {
  --tm-accent: #f0c24b;
  --tm-bg-dark: #0f0f0f;
  --tm-bg-card: #141414;
  --tm-border: #2a2a2a;
  --tm-text-muted: #6c757d;

  background-color: #000 !important;
  padding: 40px 0;
}

/* DESKTOP DEFAULT: Dark Box Container */
.togel-market-box {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  color: #fff !important;
  backdrop-filter: blur(5px); /* Optional: Adds slight blur behind */
}

/* TABLE BASE STYLES */
.tm-table {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}

.tm-table thead th {
  background-color: transparent !important;
  color: #6c757d !important;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 15px 15px;
  border-bottom: 1px solid #2a2a2a !important;
}

.tm-table tbody td {
  background-color: transparent !important;
  padding: 18px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #e0e0e0 !important;
  font-size: 0.9rem;
  vertical-align: middle;
}

.tm-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: #fff !important;
}

/* Section Title Styles */
.section-title-wrapper {
  border-left: 5px solid #f0c24b;
  padding-left: 15px;
  line-height: 1;
}
.section-title {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

@media (max-width: 767.98px) {
  .section-title-wrapper {
    padding-left: 10px;
  }
  .section-title {
    font-size: 1rem;
  }
  .d-flex.justify-content-between.align-items-end.mb-4 {
    margin-bottom: 0.75rem !important;
  }
}

.view-all-link {
  color: #f0c24b;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.view-all-link:hover {
  color: #ffe08a;
}

/* --- MOBILE 2-COLUMN CARD LAYOUT (max-width: 767.98px) --- */
@media (max-width: 767.98px) {
  .tm-table thead {
    display: none;
  }

  .pasaran-preview-section {
    padding: 10px 0;
  }

  .togel-market-box {
    background: transparent !important;
    border: none;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .tm-table {
    display: block;
  }
  .tm-table tbody {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  /* Card Styling for Mobile */
  .tm-table tbody tr {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Use the same glassy dark background for cards */
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    height: 100%;
  }

  .tm-table tbody td {
    border: none !important;
    padding: 0 !important;
    display: block;
    width: 100%;
  }

  /* Mobile Elements */
  .tm-cell-market {
    margin-bottom: 4px;
  }
  .tm-cell-market > div {
    gap: 4px !important;
    flex-direction: column !important;
  }
  .tm-cell-market .d-flex.flex-column {
    align-items: center !important;
  }

  .tm-badge {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
    margin: 0 auto;
  }
  .tm-name {
    font-size: 0.75rem;
    margin-bottom: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tm-date {
    font-size: 0.6rem;
    color: #777;
    display: block;
  }

  .tm-cell-result {
    margin-bottom: 4px;
    width: 100%;
  }
  .tm-result-box {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 4px 4px;
    /* Result box darker style */
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f0c24b;
    border-radius: 4px;
  }

  .tm-cell-schedule {
    margin-bottom: 6px;
  }
  .tm-schedule {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }
  .tm-schedule div {
    font-size: 0.65rem;
  }

  .tm-cell-action {
    margin-top: auto;
    width: 100%;
  }
  .tm-btn-bet {
    width: 100%;
    padding: 5px;
    font-size: 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
  }
}

/* Badges (Shared) */
.tm-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.bg-teal {
  background-color: #00b894;
}
.bg-brown {
  background-color: #a0522d;
}
.bg-pink {
  background-color: #e84393;
}
.bg-purple {
  background-color: #6c5ce7;
}
.bg-blue {
  background-color: #0984e3;
}
.bg-primary {
  background-color: #0d6efd;
}

.tm-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.tm-date {
  color: #aaa;
  font-family: monospace;
}

/* Result Box (Desktop Default) */
.tm-result-box {
  display: inline-block;
  background-color: #000;
  border: 1px solid #333;
  color: #f0c24b;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  min-width: 70px;
  text-align: center;
  letter-spacing: 0.1em;
  font-family: monospace;
}

/* Schedule & Icons */
.tm-schedule {
  line-height: 1.4;
}

/* Bet Button */
.tm-btn-bet {
  border: none;
  color: #000;
  padding: 8px 24px;
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
}
.tm-btn-bet:hover {
  background-color: #fff;
  color: #000;
}
