/* ==========================================================================
   SATTA KING - COMPACT & SLEEK MATRIX CHART STYLES
   ========================================================================== */

.chart-header-card {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  margin: 1rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.chart-main-title {
  color: var(--text-heading);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.chart-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin: 0.85rem auto 0 auto;
  max-width: 520px;
  width: 100%;
}

.chart-select-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.chart-select-item label {
  color: var(--text-heading);
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}

.select-yellow, .custom-select {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-heading);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.select-yellow:focus, .custom-select:focus {
  border-color: var(--pastel-indigo);
}

@media (max-width: 600px) {
  .chart-header-card {
    padding: 0.85rem 0.65rem;
    margin: 0.65rem 0;
  }
  .chart-main-title {
    font-size: 1.25rem;
  }
  .chart-controls-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    padding: 0.45rem 0.5rem;
  }
  .chart-select-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .chart-select-item label {
    font-size: 0.7rem;
  }
  .select-yellow, .custom-select {
    font-size: 0.76rem;
    padding: 0.32rem 0.35rem;
  }
  .years-pills-wrap {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.25rem;
  }
  .btn-year-pill {
    font-size: 0.72rem;
    padding: 0.28rem 0.2rem;
  }
}

@media (max-width: 360px) {
  .chart-controls-bar {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .years-pills-wrap {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 12 Months x 31 Days Matrix Table Container */
.matrix-scroll-box {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background-color: #ffffff;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.matrix-satta-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.8rem;
  min-width: 760px;
  background-color: #ffffff;
}

.matrix-satta-table th {
  background-color: #f8fafc;
  color: #334155;
  padding: 0.55rem 0.25rem;
  border: 1px solid #e2e8f0;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
  position: sticky;
  top: 0;
  z-index: 5;
}

.matrix-satta-table th.th-date-col {
  background-color: var(--pastel-indigo);
  color: #ffffff;
  width: 44px;
  font-weight: 800;
}

.matrix-satta-table td {
  border: 1px solid #e2e8f0;
  padding: 0.3rem 0.15rem;
  font-family: monospace;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-heading);
  height: 32px;
  background-color: #ffffff;
}

.matrix-satta-table td.td-date-num {
  background-color: #f8fafc;
  color: var(--pastel-indigo);
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 0.78rem;
  border-right: 2px solid #cbd5e1;
}

.matrix-satta-table tr:nth-child(even) td:not(.td-date-num) {
  background-color: #fcfcfd;
}

.matrix-satta-table tr:hover td {
  background-color: #f1f5f9;
}

.matrix-satta-table td.cell-today {
  background-color: var(--pastel-emerald-light) !important;
  color: #065f46 !important;
  font-weight: 900;
  border: 2px solid var(--pastel-emerald-border) !important;
}

.matrix-satta-table td.cell-num {
  color: #1e293b;
}

.matrix-satta-table td.cell-empty {
  color: #cbd5e1;
  font-weight: 400;
}

/* Year Selector Directory Box */
.years-directory-box {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.years-directory-title {
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.years-pills-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.35rem;
  width: 100%;
  padding-top: 0.25rem;
}

.btn-year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: 1px solid var(--border-card);
  color: var(--text-heading);
  padding: 0.32rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.78rem;
  transition: all 0.12s;
}

.btn-year-pill:hover, .btn-year-pill.active {
  background-color: var(--pastel-indigo);
  color: #ffffff;
  border-color: var(--pastel-indigo);
  font-weight: 800;
}

/* Print Rules */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .site-header, .site-footer, .chart-controls-bar, .years-directory-box, .flash-ticker {
    display: none !important;
  }
  .matrix-scroll-box {
    border: 1px solid #000000;
    box-shadow: none;
  }
  .matrix-satta-table th {
    background-color: #eeeeee !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
  .matrix-satta-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}
