/* == PANEL CHART - OPTIMIZED RESPONSIVE CSS Georgia Font | No Horizontal Scroll === */
/* GLOBAL */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%; max-width: 100%; margin: 0; padding: 0;
  overflow-x: hidden; background: #fff; color: #111; font-family: Georgia, serif;
}

.table {
  margin-bottom: 0;
}

/* MAIN PAGE */
.panel-page {
  width: 100%; max-width: 1400px; 
  margin: 0 auto; padding: 0 8px 25px;
}

/* WEBSITE TITLE */
.site-heading {
  display: block; width: 100%; margin: 9px 0;
  text-align: center; text-decoration: none;
}

.site-heading h1 {
  margin: 0; padding: 5px; color: #e66526;
  font-size: clamp(20px, 2.5vw, 30px); line-height: 1.25;
  font-weight: 800; text-transform: uppercase; overflow-wrap: anywhere;
}

/* MARKET HEADER */
.market-header {
  width: 100%; margin: 0 auto 10px; padding: 10px;
  text-align: center; background: linear-gradient(135deg, #ffeb3b, #f4511e);
  border-radius: 5px; box-shadow: 0 2px 7px rgba(0, 0, 0, .12);
}

.market-header .market-name {
  margin: 0; color: #351207; font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.3; font-weight: 800; text-transform: uppercase;
  overflow-wrap: anywhere;
}

.market-name a {
  color: #880e4f;
  text-decoration: none;
}

.market-header .market-result {
  margin: 4px 0 8px; color: #01579b; font-size: clamp(17px, 2vw, 25px);
  line-height: 1.3; font-weight: 800; overflow-wrap: anywhere;
}

/* == NAVIGATION BUTTONS == */

.scroll-navigation,
.footer-navigation {
  display: flex; align-items: center; justify-content: center;
  width: 100%; margin: 10px 0;
}

.scroll-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; min-height: 35px; padding: 8px 15px; border: 0;
  border-radius: 4px; background: #dc3545; color: #fff;
  font-family: Arial, sans-serif; font-size: 13px; line-height: 1.2;
  font-weight: 700; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
}

.scroll-btn:hover {
    background: #b91f30;
}

/* REFRESH BUTTON */
.chart-refresh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 7px 14px; border: 1px solid #b91f30; border-radius: 4px;
  background: #dc3545; color: #fff; font-family: Arial, sans-serif; font-size: 13px;
  font-weight: 700; cursor: pointer;
}

.chart-refresh-btn:hover {
    background: #b91f30;
}

/* CHART TITLE */
.chart-title {
  width: 75%; margin-top: 10px; padding: 8px 4px; background: #c9ffff;
  border: 3px solid #E65100; border-bottom: 0; text-align: center;margin: 0 auto;
}

.chart-title h2 {
  margin: 0; color: #111; font-size: clamp(14px, 2vw, 23px);
  line-height: 1.3; font-weight: 800; text-transform: uppercase; overflow-wrap: anywhere;
}

/* CHART WRAPPER */
.chart-wrapper {
  width: 75%;max-width: 100%;margin: 0 auto;padding: 0;
  overflow-x: auto;border: 3px solid #E65100;background: #fff;box-sizing: border-box;
  /*width: 75%; max-width: 100%; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid #777; background: #fff;*/
}

/* = PANEL TABLE == */
.panel-table {
  width: 100%; max-width: 100%; min-width: 0; margin: 0;
  padding: 0; table-layout: fixed; border-collapse: collapse;
  border-spacing: 0; background: #fff; font-family: Georgia, serif;
}

/* HEADER */
.panel-table thead th {
  padding: 4px 0; background: #fff; color: #000; border: 1px solid;
  font-family: Georgia, serif; font-size: clamp(9px, 1.3vw, 16px);
  line-height: 1.1; font-weight: 900; text-align: center; vertical-align: middle;
  white-space: nowrap;
}

/* DATE HEADER */
.panel-table thead th.date-heading {
  width: 15%;
  border-right: 1px solid #555;
}

/* ALL BODY CELLS */
.panel-table tbody.paneltbody > tr > td {
  padding: 0; background: #fff; color: #000;
  border: 0; font-family: Georgia, serif; font-weight: 900;
  text-align: center; vertical-align: middle;
}

/* DATE COLUMN */
.panel-table tbody.paneltbody > tr > td:first-child {
  width: 15%; padding: 2px 0; border-right: 1px solid #555;
  font-size: clamp(8px, 1.1vw, 14px); line-height: 1.08;
  white-space: normal; overflow-wrap: normal; word-break: normal;
}

/* DATE SEPARATOR */
.panel-table .date-to {
  display: block; margin: 1px 0; font-family: Georgia, serif;
  font-size: .9em; line-height: 1.05; font-weight: 700;
}

/* COLUMN PATTERN
   1 = DATE, 2 = MON PANNA, 3 = MON JODI
   4 = MON PANNA, 5 = TUE PANNA, 6 = TUE JODI
   7 = TUE PANNA, Pattern repeats for each weekday.
*/

/* PANNA CELLS */
.panel-table tbody.paneltbody > tr > td:nth-child(3n + 2),
.panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
  width: 3.1%; font-family: Georgia, serif; font-size: clamp(9px, 1.1vw, 15px);
  line-height: 1.5; font-weight: 900; text-align: center; 
  overflow-wrap: normal; word-break: normal;
}

/* MIDDLE JODI - BOLD AND HIGHLIGHTED */
.panel-table tbody.paneltbody > tr > td:nth-child(3n) {
  width: 5.8%; font-family: Georgia, serif; font-size: clamp(14px, 2vw, 27px);
  line-height: 1; font-weight: 900; letter-spacing: -1px;
  text-align: center; white-space: nowrap;
}

.panel-table tbody.paneltbody > tr > th:nth-child(3n) {
  width: 5.8%; font-family: Georgia, serif; font-size: clamp(14px, 2vw, 27px);
  line-height: 1; font-weight: 900; letter-spacing: -1px;
  text-align: center; white-space: nowrap;
}

/* SINGLE VERTICAL BORDER AFTER EACH DAY */
.panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
  border-right: 1px solid #555;
}

/* ROW SEPARATORS */
.panel-table tbody.paneltbody > tr {
  border-bottom: 1px solid #888;
}

/* RED RESULT CELLS */
.panel-table tbody.paneltbody > tr > td.r {
  color: #f00;
}

/* KEEP CUSTOM ROW BACKGROUNDS CONSISTENT */
.panel-table tbody.paneltbody > tr:hover > td {
  background: #fff;
}

/* JODI CHART LINK */
.jodi-chart-navigation {
  display: flex; justify-content: center;
  width: 100%; margin: 12px 0;
}

.jodi-chart-link {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; width: 100%; padding: 12px 8px; border: 1px solid #e0d7a3;
  border-radius: 5px; background: #fff8c9; color: #880e4f;
  font-family: Georgia, serif; font-size: 15px; line-height: 1.35;
  font-weight: 800; text-align: center; text-decoration: none; overflow-wrap: anywhere;
}

.jodi-chart-link:hover {
  background: #ffef99;
  color: #6a103e;
}

/* BOTTOM ANCHOR */
#chart-bottom {
  scroll-margin-top: 15px;
}

/* FOOTER */
.site-footer {
  width: 100%; margin-top: 12px; padding: 15px 8px;
  background: #212529; border-radius: 5px; text-align: center;
}

.site-footer .footer-text {
  margin: 0; color: #fff; font-family: Georgia, serif;
  font-size: 12px; line-height: 1.7; font-weight: 500;
}

/* FLOATING BUTTONS */
.floating-scroll {
  position: fixed; right: 8px; bottom: 10px; z-index: 9999; 
  display: flex; flex-direction: column; gap: 7px;
}
.floating-scroll button {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: #dc3545; color: #fff; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
}

/* KEYBOARD FOCUS */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* = RESPONSIVE = */

/* DESKTOP */
@media (min-width: 992px) {
  .panel-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .panel-table thead th {
    font-size: 16px;
  }

  .panel-table tbody.paneltbody > tr > td:first-child {
    font-size: 14px;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 2),
  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
    font-size: 15px;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n) {
    font-size: 25px;
  }
  
  .panel-table tbody.paneltbody > tr > th:nth-child(3n) {
    font-size: 25px;
  }
}

/* TOUCH DEVICES */
@media (hover: none) and (pointer: coarse) {
  .scroll-btn:hover,
  .chart-refresh-btn:hover,
  .floating-scroll button:hover {
      transform: none;
  }
}

/* TABLET */
@media (min-width: 576px) and (max-width: 991px) {
  .panel-table thead th {
    font-size: 13px;
  }

  .panel-table tbody.paneltbody > tr > td:first-child {
    font-size: 11px;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 2),
  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
    font-size: 12px;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n) {
    font-size: 21px;
  }
  
  .panel-table tbody.paneltbody > tr > th:nth-child(3n) {
    font-size: 21px;
  }
}

/* REGULAR MOBILE */
@media (min-width: 375px) and (max-width: 575px) {
  .panel-page {
    padding-right: 4px;
    padding-left: 4px;
  }
  
  .chart-title {
    width: 100%;
  }
  
  .chart-wrapper {
    width: 100%;
  }

  .panel-table thead th {
    font-size: 10px;
  }

  .panel-table tbody.paneltbody > tr > td:first-child {
    font-size: 8.5px;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 2),
  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
    font-size: 10px;
    line-height: 1.3;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n) {
    font-size: 19px;
    position: relative;
    right: 2px;
  }
  
  .panel-table tbody.paneltbody > tr > th:nth-child(3n) {
    font-size: 19px;
    position: relative;
    right: 4px;
  }
}

/* SMALL MOBILE */
@media (max-width: 374px) {
  .panel-page {
    padding-right: 2px; padding-left: 2px;
  }
  
  .chart-title {
    width: 100%;
  }
  
  .chart-wrapper {
    width: 100%;
  }
  
  .site-heading {
    margin: 5px 0;
  }

  .site-heading h1 {
    font-size: 19px;
  }

  .market-header {
    padding: 8px 4px;
  }

  .market-header .market-name {
    font-size: 19px;
  }

  .market-header .market-result {
    font-size: 18px;
  }

  .chart-title {
    padding: 7px 2px;
  }

  .chart-title h2 {
    font-size: 13px;
  }

  .panel-table thead th {
    padding: 3px 0 !important; font-size: 9px;
  }

  .panel-table tbody.paneltbody > tr > td:first-child {
    font-size: 7.5px;
    line-height: 1.05;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 2),
  .panel-table tbody.paneltbody > tr > td:nth-child(3n + 1):not(:first-child) {
    font-size: 9px;
    line-height: 1.2;
  }

  .panel-table tbody.paneltbody > tr > td:nth-child(3n) {
    position: relative; right: 3px;
    font-size: 17px; letter-spacing: -.6px;
  }
  
  .panel-table tbody.paneltbody > tr > th:nth-child(3n) {
    position: relative; right: 4px;
    font-size: 17px; letter-spacing: -.6px;
  }

  .scroll-btn {
    min-height: 32px; padding: 7px 11px; font-size: 12px;
  }

  .jodi-chart-link {
    font-size: 13px;
  }

  .floating-scroll {
    right: 5px; bottom: 7px;
  }

  .floating-scroll button {
    width: 32px; height: 32px;
  }
}