/* Public Timetable modern override - BLACK
   Load this file LAST, after commonstyle.css and the normal colour CSS.

   ASP expectations:
   - strTabWidth = "100%"
   - outer schedule table has class="PublicScheduleOuterTable"
   - inner schedule table has class="PublicScheduleTable"
   - expanded performer/team rows use:
     <tr class="SchedulePerformerRow ScheduleRowPast">
     <tr class="SchedulePerformerRow ScheduleRowInProgress">
     <tr class="SchedulePerformerRow SchedulePlacedRow ScheduleRowWinner">
*/

:root {
  --schedule-primary: #1f2937;
  --schedule-primary-dark: #111827;
  --schedule-primary-soft: #f3f4f6;
  --schedule-accent: #475569;
  --schedule-bg: #f6f7f9;
  --schedule-card: #ffffff;
  --schedule-text: #1f2937;
  --schedule-muted: #64748b;
  --schedule-line: #d8dee8;
  --schedule-past: #64748b;
  --schedule-future: #1f2937;
  --schedule-live: #137333;
  --schedule-live-bg: #e8f8ee;
  --schedule-live-line: #c7ecd2;
  --schedule-next: #d97706;
  --schedule-next-bg: #fff7e6;
  --schedule-next-line: #f8dfad;
  --schedule-award: #8a4b00;
  --schedule-award-bg: #fffaf0;
  --schedule-award-line: #ead7a3;
  --schedule-danger: #b42318;
  --schedule-danger-bg: #fff4f2;
  --schedule-radius: 18px;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  background: var(--schedule-bg);
  color: var(--schedule-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

center {
  max-width: 100%;
}

.cont,
.body_con,
.body_area_right,
.full_top_area {
  width: 100% !important;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}

.body_con {
  padding: 0 14px 24px;
}

.body_area_right {
  min-height: 0 !important;
}

.full_area_space,
.right_area_space {
  display: none !important;
}

.header_top {
  width: 100% !important;
  max-width: 1100px;
  height: auto !important;
  min-height: 74px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--schedule-primary-dark), var(--schedule-primary));
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
}

.logo {
  float: none !important;
  width: auto !important;
  max-width: 70%;
  height: auto !important;
  padding: 0 !important;
  line-height: 1.05;
}

.logo i,
.logo font {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(24px, 4vw, 42px) !important;
  font-weight: 800;
  font-style: normal !important;
  letter-spacing: .02em;
  color: #fff !important;
}

.top_online_registration_txt {
  float: none !important;
  width: auto !important;
  color: rgba(255, 255, 255, .9) !important;
  text-align: right;
  font-size: 13px;
  line-height: 1.25;
}

.top_online_registration_txt p {
  margin: 2px 0;
  color: inherit !important;
}

.banner_area {
  width: 100% !important;
  max-width: 1100px;
  height: auto !important;
  margin: 14px auto 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
  background: #fff;
}

.banner_area img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 240px;
  object-fit: cover;
}

.full_top_area {
  margin-top: 18px;
  background: var(--schedule-card);
  border: 1px solid var(--schedule-line);
  border-radius: var(--schedule-radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.full_top_area_top_img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  background: linear-gradient(135deg, var(--schedule-primary), var(--schedule-accent)) !important;
  border: 0 !important;
  padding: 16px 22px !important;
}

.full_top_area_top_img h1 {
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 750 !important;
  letter-spacing: .01em;
}

.full_top_area_down_img {
  width: 100% !important;
  min-height: 0 !important;
  padding: 18px 22px 26px !important;
  background: #fff !important;
  border: 0 !important;
}

.editor {
  padding: 0 !important;
}

form#filters {
  margin: 0 0 14px;
}

form#filters table {
  width: 100% !important;
  max-width: 760px;
  margin: 0 auto;
  border-collapse: collapse;
}

form#filters td {
  padding: 6px 8px;
  font-size: 14px;
  color: var(--schedule-muted);
}

select {
  max-width: 100%;
  border: 1px solid var(--schedule-line);
  border-radius: 10px;
  padding: 8px 34px 8px 10px;
  background: #fff;
  color: var(--schedule-text);
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

select:focus {
  outline: 3px solid var(--schedule-primary-soft);
  border-color: var(--schedule-primary);
}

/* Schedule table desktop/tablet baseline */
.PublicScheduleOuterTable,
.PublicScheduleTable {
  width: 100% !important;
  max-width: 940px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.editor > table,
.editor > table > tbody > tr > td > table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 7px !important;
}

tr.ScheduleDateToday td,
tr.ScheduleDateFuture td {
  padding: 18px 10px 8px !important;
  text-align: center !important;
  color: var(--schedule-primary-dark) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

/* Main section rows */
tr[id^="AG"].ScheduleRowPast,
tr[id^="AG"].ScheduleRowNormal,
tr[id^="AG"].ScheduleRowComingUp,
tr[id^="AG"].ScheduleRowInProgress {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--schedule-line);
}

tr[id^="AG"].ScheduleRowPast > td,
tr[id^="AG"].ScheduleRowNormal > td,
tr[id^="AG"].ScheduleRowComingUp > td,
tr[id^="AG"].ScheduleRowInProgress > td {
  padding: 7px 8px !important;
  border-top: 1px solid var(--schedule-line);
  border-bottom: 1px solid var(--schedule-line);
  vertical-align: middle !important;
}

tr[id^="AG"].ScheduleRowPast > td:first-child,
tr[id^="AG"].ScheduleRowNormal > td:first-child,
tr[id^="AG"].ScheduleRowComingUp > td:first-child,
tr[id^="AG"].ScheduleRowInProgress > td:first-child {
  border-left: 1px solid var(--schedule-line);
  border-radius: 13px 0 0 13px;
  text-align: center;
  width: 32px !important;
}

tr[id^="AG"].ScheduleRowPast > td:last-child,
tr[id^="AG"].ScheduleRowNormal > td:last-child,
tr[id^="AG"].ScheduleRowComingUp > td:last-child,
tr[id^="AG"].ScheduleRowInProgress > td:last-child {
  border-right: 1px solid var(--schedule-line);
  border-radius: 0 13px 13px 0;
}

tr[id^="AG"].ScheduleRowPast,
tr[id^="AG"].ScheduleRowPast a,
tr[id^="AG"].ScheduleRowPast span {
  color: var(--schedule-past) !important;
  font-weight: 500;
}

tr[id^="AG"].ScheduleRowNormal,
tr[id^="AG"].ScheduleRowNormal a,
tr[id^="AG"].ScheduleRowNormal span {
  color: var(--schedule-future) !important;
  font-weight: 600;
}

tr[id^="AG"].ScheduleRowComingUp,
tr[id^="AG"].ScheduleRowComingUp a,
tr[id^="AG"].ScheduleRowComingUp span {
  color: var(--schedule-next) !important;
  font-weight: 700;
}

tr[id^="AG"].ScheduleRowComingUp > td {
  background: var(--schedule-next-bg) !important;
  border-color: var(--schedule-next-line) !important;
}

tr[id^="AG"].ScheduleRowInProgress,
tr[id^="AG"].ScheduleRowInProgress a,
tr[id^="AG"].ScheduleRowInProgress span {
  color: var(--schedule-live) !important;
  font-weight: 800;
}

tr[id^="AG"].ScheduleRowInProgress > td {
  background: var(--schedule-live-bg) !important;
  border-color: var(--schedule-live-line) !important;
}

tr[id^="AG"] > td:nth-child(2) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700 !important;
}

tr[id^="AG"].ScheduleRowInProgress > td:last-child,
tr[id^="AG"].ScheduleRowComingUp > td:last-child {
  font-weight: 800 !important;
}

/* Sponsorship / advert rows use colspan=5 */
tr[id^="AG"] > td[colspan="5"] {
  border-radius: 14px !important;
  border: 1px solid var(--schedule-line) !important;
  padding: 14px !important;
  color: var(--schedule-text) !important;
  background: #fff !important;
}

tr[id^="AG"] img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}

/* Expanded performer/team rows */
tr.SchedulePerformerRow {
  background: transparent !important;
  box-shadow: none !important;
}

tr.SchedulePerformerRow > td {
  padding: 2px 6px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
  border-top: 1px solid var(--schedule-line) !important;
  border-bottom: 1px solid var(--schedule-line) !important;
  background: #fff !important;
}

tr.SchedulePerformerRow > td:first-child {
  width: 28px !important;
  border-left: 1px solid var(--schedule-line) !important;
  border-radius: 10px 0 0 10px !important;
}

tr.SchedulePerformerRow > td:last-child {
  border-right: 1px solid var(--schedule-line) !important;
  border-radius: 0 10px 10px 0 !important;
}

tr.SchedulePerformerRow,
tr.SchedulePerformerRow td,
tr.SchedulePerformerRow a,
tr.SchedulePerformerRow span {
  font-size: 14px !important;
  font-weight: 500 !important;
}

tr.SchedulePerformerRow table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  background: transparent !important;
}

tr.SchedulePerformerRow table td {
  padding: 1px 4px !important;
  line-height: 1.1 !important;
  height: auto !important;
  border: 0 !important;
  background: transparent !important;
}

tr.SchedulePerformerRow.ScheduleRowPast > td,
tr.SchedulePerformerRow.ScheduleRowNormal > td {
  background: #fff !important;
  color: var(--schedule-muted) !important;
  font-weight: 500 !important;
}

tr.SchedulePerformerRow.ScheduleRowInProgress > td {
  background: var(--schedule-live-bg) !important;
  color: var(--schedule-live) !important;
  border-color: var(--schedule-live-line) !important;
  font-weight: 650 !important;
}

/* Placed performers */
tr.SchedulePerformerRow.SchedulePlacedRow > td {
  background: var(--schedule-award-bg) !important;
  color: var(--schedule-award) !important;
  border-color: var(--schedule-award-line) !important;
  font-weight: 600 !important;
}

tr.SchedulePerformerRow.SchedulePlacedRow table,
tr.SchedulePerformerRow.SchedulePlacedRow table tr,
tr.SchedulePerformerRow.SchedulePlacedRow table td {
  background: transparent !important;
  border: 0 !important;
}

tr.SchedulePerformerRow table td:last-child {
  text-align: left !important;
  white-space: nowrap !important;
  font-weight: 600 !important;
}

.editor table tr td hr {
  margin: 4px auto !important;
  border: 0 !important;
  border-top: 1px solid var(--schedule-line) !important;
}

/* ==========================================================
   Phone / narrow tablet layout
   Using 980px because Samsung Internet is clearly applying
   a wider viewport than the old 720px breakpoint.
   ========================================================== */

@media screen and (max-width: 980px) {

  body {
    font-size: 17px !important;
    background: #eef3f8;
    overflow-x: hidden;
  }

  .cont,
  .body_con,
  .body_area_right,
  .full_top_area,
  .full_top_area_down_img,
  .editor {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden;
  }

  .body_con {
    padding: 0 4px 90px !important;
  }

  .header_top {
    border-radius: 0;
    padding: 10px 12px;
    display: block;
    text-align: center;
  }

  .logo {
    max-width: 100%;
  }

  .logo i,
  .logo font {
    font-size: clamp(22px, 7vw, 30px) !important;
  }

  .top_online_registration_txt {
    display: none;
  }

  .banner_area {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .banner_area img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 180px;
    object-fit: contain;
  }

  .full_top_area {
    margin-top: 8px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .full_top_area_top_img {
    padding: 12px 14px !important;
  }

  .full_top_area_top_img h1 {
    text-align: center;
    font-size: 20px !important;
  }

  .full_top_area_down_img {
    padding: 8px 4px 90px !important;
  }

  form#filters table,
  form#filters tbody,
  form#filters tr,
  form#filters td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left;
  }

  form#filters td {
    padding: 3px 0;
  }

  form#filters select {
    width: 100%;
    font-size: 18px;
  }

  .PublicScheduleOuterTable,
  .PublicScheduleTable {
    width: 100% !important;
    max-width: 100% !important;
  }

  .PublicScheduleOuterTable,
  .PublicScheduleOuterTable > tbody,
  .PublicScheduleOuterTable > tbody > tr,
  .PublicScheduleOuterTable > tbody > tr > td,
  .PublicScheduleTable,
  .PublicScheduleTable > tbody {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  tr.ScheduleDateToday,
  tr.ScheduleDateFuture,
  tr.ScheduleDateToday td,
  tr.ScheduleDateFuture td {
    display: block !important;
    width: 100% !important;
  }

  tr.ScheduleDateToday td,
  tr.ScheduleDateFuture td {
    font-size: 22px !important;
    line-height: 1.25 !important;
    padding: 14px 4px 10px !important;
  }

  /*
    Standard desktop-generated schedule rows:
    td 1 = plus/blank
    td 2 = time
    td 3 = section name
    td 4 = status
  */
  .PublicScheduleTable tr[id^="AG"].ScheduleRowPast,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowNormal,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowComingUp,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowInProgress {
    display: grid !important;
    grid-template-columns: 34px 78px minmax(0, 1fr);
    grid-template-rows: auto auto;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 !important;
    border: 1px solid var(--schedule-line) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
  }

  .PublicScheduleTable tr[id^="AG"].ScheduleRowPast > td,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowNormal > td,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowComingUp > td,
  .PublicScheduleTable tr[id^="AG"].ScheduleRowInProgress > td {
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 4px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    background: rgba(15, 23, 42, .03);
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 4px !important;
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    background: rgba(15, 23, 42, .03);
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(2) a,
  .PublicScheduleTable tr[id^="AG"] > td:nth-child(2) span {
    font-size: 16px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    padding: 10px 9px 2px 9px !important;
    font-size: 18px !important;
    line-height: 1.22 !important;
    font-weight: 750 !important;
  }
  
  .PublicScheduleTable tr[id^="AG"] > td:nth-child(3) a,
  .PublicScheduleTable tr[id^="AG"] > td:nth-child(3) span {
    font-size: 18px !important;
    line-height: 1.22 !important;
    font-weight: 750 !important;
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    padding: 0 10px 12px 10px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    text-align: left !important;
  }

  .PublicScheduleTable tr[id^="AG"] > td:nth-child(n+5) {
    display: none !important;
  }

  /*
    Advert/sponsor rows use colspan=5.
    Keep them full-width.
  */
  .PublicScheduleTable tr[id^="AG"] > td[colspan="5"] {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    text-align: center !important;
  }

  .PublicScheduleTable tr[id^="AG"] > td[colspan="5"] img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  /*
    Performer rows:
    <tr class="SchedulePerformerRow ...">
      <td>&nbsp;</td>
      <td colspan="3"><table>...</table></td>
    </tr>
  */
  .PublicScheduleTable tr.SchedulePerformerRow {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 5px 0 !important;
    border: 0 !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow > td:first-child {
    display: none !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow > td[colspan="3"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: 1px solid var(--schedule-line) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow table,
  .PublicScheduleTable tr.SchedulePerformerRow table tbody,
  .PublicScheduleTable tr.SchedulePerformerRow table tr {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow table tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .PublicScheduleTable tr.SchedulePerformerRow table td {
    display: block !important;
    padding: 10px 10px !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    border: 0 !important;
    background: transparent !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow table td:first-child {
    width: auto !important;
    font-weight: 700 !important;
  }

  .PublicScheduleTable tr.SchedulePerformerRow table td:last-child {
    white-space: nowrap !important;
    text-align: right !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  .editor table tr td hr {
    margin: 6px auto !important;
    border: 0 !important;
    border-top: 1px solid var(--schedule-line) !important;
  }

  .powered_by,
  .powered-by,
  .powered-by-footer,
  .footer,
  .footer_bottom {
    position: static !important;
  }
}

/* Footer used by includebottom.asp - always MyCompHQ / MyClubMate blue */
.foot_wraper {
  width: 100%;
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 14px 24px;
  box-sizing: border-box;
}

.foot_area {
  width: 100%;
  background: #45aae4;
  border: 1px solid #3197d2;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(69, 170, 228, .25);
  box-sizing: border-box;
}

.foot_txt {
  padding: 14px 18px;
  text-align: center;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  box-sizing: border-box;
}

.foot_txt p {
  margin: 0;
  color: #ffffff;
  white-space: normal;
  overflow-wrap: anywhere;
}

.foot_txt a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
}

@media screen and (max-width: 980px) {
  .foot_wraper {
    max-width: 100%;
    margin-top: 12px;
    padding: 0 8px 86px;
  }

  .foot_area {
    border-radius: 14px;
  }

  .foot_txt {
    padding: 12px 10px;
    font-size: 13px;
  }
}