/*
 * Portal blocks — same glass language as the theme, but self-contained, so the
 * blocks look the same in the editor as on the site. The doubled class
 * (.fscz-table.fscz-table) outranks the theme's generic table rules.
 */

/* --- Tables ------------------------------------------------------------ */
.fscz-table {
  max-width: 100%;
  margin: 14px 0 30px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.24) transparent;
}
.fscz-table.fscz-table > table {
  display: table;
  width: 100%;
  min-width: 560px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 14.5px;
  white-space: normal;
}
/* Padding needs !important: the theme sets table cells with it (style.css §28) */
.fscz-table.fscz-table th {
  padding: 13px 20px !important;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.5);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
}
.fscz-table.fscz-table td {
  padding: 12px 20px !important;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.66);
  font-size: 14px;
  font-weight: 400;
  vertical-align: middle;
}
.fscz-table.fscz-table tbody tr:first-child td { border-top: 0; }
.fscz-table.fscz-table tbody tr:nth-child(even) { background: rgba(255,255,255,.022); }
.fscz-table.fscz-table tbody tr:hover { background: rgba(255,255,255,.055); }
.fscz-table.fscz-table td:first-child { color: #fff; font-weight: 500; }

/* Start number is the identifier — a badge, not body text */
.fscz-table.fscz-table td.fscz-number,
.fscz-table.fscz-table th:last-child:nth-child(4) { width: 1%; white-space: nowrap; }
.fscz-table.fscz-table td.fscz-number {
  color: var(--wp--preset--color--accent, #FFC72C);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.fscz-table.fscz-table td.fscz-time { width: 1%; white-space: nowrap; color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.fscz-table--teams.fscz-table--teams td:nth-child(3) { white-space: nowrap; }
.fscz-table--schedule.fscz-table--schedule td.fscz-where { white-space: nowrap; }
.fscz-table--schedule.fscz-table--schedule td.fscz-note { width: 38%; min-width: 220px; }

/* --- Empty and unavailable lists ---------------------------------------- */
.fscz-empty {
  margin: 10px 0 26px;
  padding: 15px 20px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  color: rgba(255,255,255,.45);
  font-size: 14px;
}

/* --- Registered / Pending / Waiting ------------------------------------- */
.fscz-teams { margin: 18px 0 40px; }
.fscz-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.fscz-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(255,255,255,.62);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.fscz-tabs [role="tab"]:hover { background: rgba(255,255,255,.1); color: #fff; }
.fscz-tabs [role="tab"][aria-selected="true"] { background: rgba(255,255,255,.94); color: #08090c; }
.fscz-tabs [role="tab"]:focus-visible { outline: 2px solid var(--wp--preset--color--accent, #FFC72C); outline-offset: 2px; }
.fscz-tabs__n { font-size: 11.5px; font-weight: 600; opacity: .6; font-variant-numeric: tabular-nums; }

.fscz-teams .fscz-teams__label {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
  color: var(--wp--preset--color--accent, #FFC72C);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.fscz-teams .fscz-teams__label .fscz-tabs__n { margin-left: 4px; }

/* With the script: one list at a time, the switch instead of the labels */
.fscz-teams.is-tabbed .fscz-tabs { display: flex; }
.fscz-teams.is-tabbed .fscz-teams__label { display: none; }
.fscz-teams.is-tabbed .fscz-teams__panel:not(.is-active) { display: none; }

/* --- Counters ----------------------------------------------------------- */
.fscz-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 8px 0 32px;
}
.fscz-count {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.fscz-count__n { color: #fff; font-size: 40px; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.fscz-count__l { color: rgba(255,255,255,.5); font-size: 15px; font-weight: 600; }
.fscz-count__note { grid-column: 1 / -1; margin-top: 9px; color: rgba(255,255,255,.4); font-size: 12.5px; }

/* --- Schedule ----------------------------------------------------------- */
.fscz-schedule .fscz-schedule__day {
  margin: 34px 0 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.fscz-schedule .fscz-schedule__day:first-child { margin-top: 8px; }

/* --- Inspection status chips --------------------------------------------- */
.fscz-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 13px;
}
.fscz-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.fscz-status.is-passed { color: #fff; }
.fscz-status.is-passed::before { background: #3ecf8e; }
.fscz-status.is-failed::before { background: #ff5a5f; }
.fscz-status.is-active::before { background: var(--wp--preset--color--accent, #FFC72C); }
.fscz-status.is-idle,
.fscz-status.is-none { color: rgba(255,255,255,.38); }
.fscz-status.is-none::before { display: none; }

/* --- Phones: no blur (the theme does the same), tighter cells ------------- */
@media (max-width: 600px) {
  .fscz-table.fscz-table > table,
  .fscz-tabs,
  .fscz-count {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: rgba(20,22,28,.82);
  }
  .fscz-table.fscz-table th,
  .fscz-table.fscz-table td { padding: 11px 14px !important; }
  .fscz-count { padding: 16px 18px; }
  .fscz-count__n { font-size: 32px; }

  /* The switch spans the width in one row */
  .fscz-teams.is-tabbed .fscz-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: 100%;
  }
  .fscz-tabs [role="tab"] { justify-content: center; gap: 6px; padding: 8px 6px; font-size: 13px; }

  /* Rows become compact cards: no sideways scrolling on a phone */
  .fscz-table--teams.fscz-table--teams > table,
  .fscz-table--schedule.fscz-table--schedule > table { display: block; min-width: 0; }
  .fscz-table--teams thead,
  .fscz-table--schedule thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .fscz-table--teams tbody,
  .fscz-table--schedule tbody { display: block; }
  .fscz-table--teams tr,
  .fscz-table--schedule tr {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 14px;
    row-gap: 2px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .fscz-table--teams tbody tr:first-child,
  .fscz-table--schedule tbody tr:first-child { border-top: 0; }
  .fscz-table--teams.fscz-table--teams td,
  .fscz-table--schedule.fscz-table--schedule td {
    display: block;
    grid-column: 1;
    padding: 0 !important;
    border: 0;
    white-space: normal;
    font-size: 12.5px;
    line-height: 1.4;
  }
  .fscz-table--teams.fscz-table--teams td:first-child { font-size: 14.5px; }
  .fscz-table--teams.fscz-table--teams td.fscz-number {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    width: auto;
    font-size: 13px;
  }
  .fscz-table--schedule.fscz-table--schedule td.fscz-time {
    width: auto;
    color: var(--wp--preset--color--accent, #FFC72C);
    font-size: 12px;
    font-weight: 600;
  }
  .fscz-table--schedule.fscz-table--schedule td:nth-child(2) { color: #fff; font-size: 14.5px; font-weight: 500; }
  .fscz-table--schedule tr { grid-template-columns: 1fr; }
  .fscz-table--schedule.fscz-table--schedule td.fscz-note { width: auto; min-width: 0; }
}

/* --- Print: every list, black on white ------------------------------------ */
@media print {
  .fscz-tabs { display: none !important; }
  .fscz-teams__label { display: block !important; color: #111 !important; }
  .fscz-teams__panel { display: block !important; }
  .fscz-table.fscz-table > table { min-width: 0; border: 1px solid #999; border-radius: 0; background: none; box-shadow: none; }
  .fscz-table.fscz-table th { background: #f1f1f1; color: #111; }
  .fscz-table.fscz-table td,
  .fscz-table.fscz-table td:first-child,
  .fscz-count__n,
  .fscz-schedule__day { color: #111; }
  .fscz-count { border: 1px solid #ddd; background: none; box-shadow: none; }
}
