/* =========================
   Visibility utilities
   ========================= */
.is-hidden { display: none; }
.is-visible { display: block; }
table.is-visible { display: table; }

/* =========================
   Mobile / Desktop switch
   ========================= */
.tlq-mobile-tables { display: block; width: 100%; }
.tlq-desktop-tables { display: none; width: 100%; }
@media (min-width: 768px) {
  .tlq-mobile-tables { display: none; }
  .tlq-desktop-tables { display: block; }
}

/* =========================
   Theme tokens (defaults)
   ========================= */
:root{
  --tlq-color: #C21B17;
  --tlq-text: #1a1a1a;
  --tlq-bg: #ffffff;
  --tlq-border: #ccd4cf;
  --tlq-divider: #ccd4cf;
  --tlq-leftcell: #f8f9fb;
  --tlq-tab-muted: #8a8f98;
  --tlq-shadow: 0 3px 6px rgba(0,0,0,.06);
  --tlq-box-shadow: #ccd4cf87;

  /* row-type tokens */
  --row-info-fg: #ffffff;
  --row-section-bg: #e5ebe7;
  --row-section-fg: #2c2f33;
  --row-data-bg: #ffffff;
  --row-data-fg: #222;

  /* table layout tokens */
  --tlq-header-height: 80px;
  --tlq-header-font-size: 22px;
  --tlq-cell-pad-x: 18px;
  --tlq-coverage-indent: 20px;
}

/* =========================
   Top (group) tabs
   ========================= */
.tlq-top-tabs,
.tlq-d-top-tabs{
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 16px 0 50px;
  background: transparent;
  z-index: 1;
}
.tlq-top-tabs::before,
.tlq-d-top-tabs::before{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 46px;
  background: transparent;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: var(--tlq-shadow);
  z-index: 0;
}

/* Desktop tabs */
.tlq-d-top-tabs .tlq-d-top-tab{
  position: relative;
  z-index: 1;
  width: 250px;
  height: 70px;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--tlq-tab-muted);
  font: 700 22px/70px Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border-bottom: 4px solid #ccc;
}
.tlq-d-top-tabs .tlq-d-top-tab.is-active{
  background: var(--tlq-color);
  color: #fff;
  border-bottom: 4px solid #961714;
}

/* Mobile tabs */
.tlq-top-tabs .tlq-top-tab{
  position: relative;
  z-index: 1;
  width: 45%;                /* two side-by-side */
  height: 70px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: var(--tlq-tab-muted);
  font: 700 22px/70px Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border-bottom: 4px solid #ccc;
}
.tlq-top-tabs .tlq-top-tab.is-active{
  background: var(--tlq-color);
  color: #fff;
  border-bottom: 4px solid #961714;
}

/* =========================
   Mobile coverage selector
   ========================= */
.tlq-mobile-tables .tlq-coverage-tabs{
  display:flex;
  align-items:stretch;
  gap:0;
  padding:0;
  height:auto;
  min-height:48px;
  width:90%;
  margin-left:5%;
  box-shadow: 0 -1px 3px 2px var(--tlq-box-shadow);
}
.tlq-mobile-tables .tlq-arrow{
  width:48px;
  border:0;
  border-radius:0;
  background:#fff;
  color:var(--tlq-color);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  height:48px;
  border-bottom:3px solid var(--tlq-border);
}
.tlq-mobile-tables .tlq-arrow[disabled]{ color:#cfd6d2; pointer-events:none; }

.tlq-mobile-tables .tlq-coverage-strip{
  flex:1 1 auto;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  gap:0;
  overflow:hidden;
}

/* windowing: JS toggles visibility */
.tlq-mobile-tables .tlq-coverage-tab{ display:none; }
.tlq-mobile-tables .tlq-coverage-tab.is-window-visible{ display:flex; }

.tlq-mobile-tables .tlq-coverage-tab{
  flex:1 1 0;
  border:0;
  border-radius:0;
  background:#fff;
  color:var(--tlq-color);
  font-size:16px;
  letter-spacing:.2px;
  text-align:center;
  align-items:center;
  justify-content:center;
  position:relative;
  user-select:none;
  white-space:nowrap;
  border-bottom:3px solid var(--tlq-border);
}

@media (max-width:760px){
  /* MOBILE: coverage tab text — first line red, rest black & smaller */
  .tlq-mobile-tables .tlq-coverage-tab-text{
    color:var(--tlq-color);
    font-size:14px;
    font-weight:700;
    line-height:1.2;
    border-left:1px solid var(--tlq-divider);
    border-right:1px solid var(--tlq-divider);
    width:100%;
    max-width:100%;
    white-space:normal;
    word-break:break-word;
    overflow-wrap:anywhere;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    overflow:hidden;
    text-overflow:ellipsis;
    padding:6px 8px;
  }
  /* keep first tab border clean */
  .tlq-mobile-tables .tlq-coverage-tab.is-window-visible:first-child{ border-left:0; }
}
.tlq-mobile-tables .tlq-coverage-tab.is-active{ border-bottom:3px solid var(--tlq-color); }

/* =========================
   Tables — shared base
   ========================= */
.tlq-desktop-tables .coverage-table,
.tlq-mobile-tables  .coverage-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  background:var(--tlq-bg);
  border:1px solid var(--tlq-border);
}
.tlq-mobile-tables  .coverage-table{ box-shadow:0 1px 3px 2px var(--tlq-box-shadow); }

/* Cells / headers: collapsed 1px grid */
.tlq-desktop-tables .coverage-table th,
.tlq-desktop-tables .coverage-table td,
.tlq-mobile-tables  .coverage-table th,
.tlq-mobile-tables  .coverage-table td{
  border:1px solid var(--tlq-divider);
  padding:14px 18px;
  vertical-align:middle;
  background:var(--row-data-bg);
  color:var(--row-data-fg);
  font-size:14px;
}

/* Header (desktop) */
.tlq-desktop-tables .coverage-table thead tr{ height:var(--tlq-header-height); }
.tlq-desktop-tables .coverage-table thead th{
  background:#fff;
  color:var(--tlq-text);
  text-align:center;
  vertical-align:middle;
  padding:0 var(--tlq-cell-pad-x);
  font-size:20px;
}
.tlq-desktop-tables .coverage-table thead th.tlq-d-th-coverage{
  text-align:left;
  background:var(--tlq-leftcell);
  font-weight:700;
}

/* Value headers: base text black, smaller; first line red & larger */
.tlq-desktop-tables .coverage-table thead th.tlq-d-th-value{
  color:var(--tlq-text);
  font-size:16px;
  line-height:1.2;
}
.tlq-desktop-tables .coverage-table thead th.tlq-d-th-value::first-line{
  color:var(--tlq-color);
  font-weight:700;
  font-size:20px;
}

/* (Keep the generic color only for headers that aren't using tlq-d-th-value) */
.tlq-desktop-tables .coverage-table thead th:not(:first-child):not(.tlq-d-th-value){
  color:var(--tlq-color);
}

/* First column (coverage names) */
.tlq-desktop-tables .coverage-table tbody td.tlq-coverage-name,
.tlq-mobile-tables  .coverage-table tbody td.tlq-coverage-name{
  background:var(--tlq-leftcell);
  color:#30343a;
  font-weight:500;
  text-align:left;
}

/* Value cells allow wrapping */
.tlq-desktop-tables .coverage-table td.tlq-coverage-value,
.tlq-mobile-tables  .coverage-table td.tlq-coverage-value,
.tlq-desktop-tables .coverage-table tbody td:not(:first-child),
.tlq-mobile-tables  .coverage-table tbody td:not(:first-child){
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  text-align:center;
}

/* Row types */
.tlq-desktop-tables .coverage-table tbody tr.tlq-info-title td,
.tlq-mobile-tables  .coverage-table tbody tr.tlq-info-title td{
  background:var(--tlq-color);
  color:var(--row-info-fg);
  font-weight:700;
  text-align:left;
}
.tlq-desktop-tables .coverage-table tbody tr.tlq-coverage-title td,
.tlq-mobile-tables  .coverage-table tbody tr.tlq-coverage-title td{
  background:var(--row-section-bg);
  color:var(--row-section-fg);
  font-weight:700;
}
/* Desktop: coverage-title row that includes values */
.tlq-desktop-tables .coverage-table tbody tr.tlq-coverage-title--with-values td:not(:first-child){
  text-align:center;
}

/* Coverage names: extra left padding on data rows */
.tlq-desktop-tables .coverage-table tbody .tlq-d-row td.tlq-coverage-name{
  padding-left:calc(var(--tlq-cell-pad-x) + var(--tlq-coverage-indent));
}
.tlq-mobile-tables .coverage-table tbody .tlq-row td.tlq-coverage-name{
  padding-left:var(--tlq-coverage-indent);
}

/* Mobile breathing room */
.tlq-mobile-tables .coverage-table{ width:90%; margin-left:5%; }
.tlq-mobile-tables .coverage-table td{ min-width:0; }
.tlq-mobile-tables .coverage-table td:first-child{
  white-space:normal;
  word-break:break-word;
}

/* Column sizing (desktop colgroup driven) */
.tlq-desktop-tables .coverage-table col.col-name{ width:var(--name-col, 30%); }
.tlq-desktop-tables .coverage-table thead th:first-child{ width:var(--name-col, 30%); }

/* Column sizing (mobile 2-col variant) */
@media (max-width:760px){
  .tlq-mobile-tables .coverage-table tbody td:not(:first-child){ padding:10px; }
  .tlq-mobile-tables .coverage-table col.col-name { width:var(--name-col, 70%); }
  .tlq-mobile-tables .coverage-table col.col-val  { width:calc(100% - var(--name-col, 70%)); }
  .tlq-mobile-tables .dynamic-table-legend,
  .tlq-desktop-tables .dynamic-table-legend{
    padding-top:10px;
    padding-left:5%;
    padding-right:5%;
  }
}

/* Mobile: CoverageTitle row with a value (two cells) */
.tlq-mobile-tables .coverage-table tbody tr.tlq-coverage-title--with-value td{
  background:var(--row-section-bg);
  color:var(--row-section-fg);
  font-weight:700;
  text-align:left;
}
.tlq-mobile-tables .coverage-table tbody tr.tlq-coverage-title--with-value td:nth-child(2){
  text-align:center;
}
/* Ensure leftcell color doesn’t override the grey band */
.tlq-mobile-tables .coverage-table tbody tr.tlq-coverage-title td:first-child{
  background:var(--row-section-bg);
}

/* Icon */
.tlq-mobile-tables .dynamic-table-icons,
.tlq-desktop-tables .dynamic-table-icons {
  height:13px;
  width:18px;
}

/* Legend */
.tlq-mobile-tables .dynamic-table-legend,
.tlq-desktop-tables .dynamic-table-legend { padding-top:10px; }

/* Lists in value cells */
.tlq-mobile-tables .tlq-coverage-value ul,
.tlq-desktop-tables .tlq-coverage-value ul {
  margin-top:0;
  list-style:disc;
  list-style-position:inside;
}
.tlq-mobile-tables .tlq-coverage-value li,
.tlq-desktop-tables .tlq-coverage-value li {
  text-align:left;
  overflow-x:visible;
  overflow-y:visible;
  margin-right:0;
}

/* When Indent is false, remove the extra left indent and use 18px */
.tlq-desktop-tables .coverage-table td.tlq-no-indent,
.tlq-mobile-tables  .coverage-table td.tlq-no-indent {
  padding-left:18px !important;
}

/* =========================
   Champalimaud (EXTRA) banner
   ========================= */
.tlq-champ-banner{
  background:#006ac8;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:32px 18px;
  font-weight:700;
}
.tlq-champ-banner__title{
  font-size:22px;
  text-transform:uppercase;
  letter-spacing:.5px;
}
.tlq-champ-banner__brand{
  display:flex; align-items:center; gap:10px;
  font-size:14px; font-weight:700;
}
.tlq-champ-banner__logo-img{ height:18px; margin-right:20px; }

@media (max-width:760px){
  .tlq-mobile-tables .tlq-champ-banner{
    width:90%;
    margin-left:5%;
    border-top-left-radius:4px;
    border-top-right-radius:4px;
  }
}

/* =========================
   Champalimaud table overrides
   ========================= */

/* Set 80/20 columns for this table (works on desktop & mobile colgroups) */
.tlq-champ-table{ --name-col: 80%; }

/* Make this table fully white */
.tlq-desktop-tables .tlq-champ-table th,
.tlq-desktop-tables .tlq-champ-table td,
.tlq-mobile-tables  .tlq-champ-table th,
.tlq-mobile-tables  .tlq-champ-table td{
  background:#fff;
  color:var(--tlq-text);
}

/* Remove grey left-cell background just for this table */
.tlq-desktop-tables .tlq-champ-table tbody td.tlq-coverage-name,
.tlq-mobile-tables  .tlq-champ-table tbody td.tlq-coverage-name{
  background:#fff;
}

/* Section/title rows white on this table */
.tlq-desktop-tables .tlq-champ-table tbody tr.tlq-coverage-title td,
.tlq-mobile-tables  .tlq-champ-table tbody tr.tlq-coverage-title td{
  background:#fff;
}

/* Champ headers: centered, black, tight horizontal padding */
.tlq-desktop-tables .tlq-champ-table thead th.tlq-champ-header,
.tlq-mobile-tables  .tlq-champ-table thead th.tlq-champ-header{
  color:var(--tlq-text);
  text-align:center;
  padding-left:0;
  padding-right:0;
}

/* Optional: perfectly flat on mobile */
@media (max-width:760px){
  .tlq-mobile-tables .tlq-champ-table{ box-shadow:none; }
}
