/* ============================================================
   COMLEX Level 1 — Product Cards
   Promoted from the VWO product-cards test, variation V4 (compact spacing).
   Everything is scoped to #tlx-pc so host (Bootstrap/theme) styles
   don't leak in and these don't leak out.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Keep the cards hidden until prices/labels are filled in */
#tlx-pc:not(.tlx-ready) { visibility: hidden; opacity: 0; }

#tlx-pc {
  --tlx-navy: #14426B;
  --tlx-navy-dark: #0D3756;
  --tlx-teal: #2BBBAD;
  --tlx-teal-dark: #00AC97;
  --tlx-btn: #26A699;
  --tlx-label: #767676;
  --tlx-subtle-foot: #F7F9FB;
  --tlx-coral-dark: #E05344;
  --tlx-heading: #14426B;
  --tlx-body: #3E4C59;
  --tlx-muted: #7A7A7A;
  --tlx-subtle: #F7F9FB;
  --tlx-gray-200: #E2E6EA;
  --tlx-gray-300: #CBD2D9;
  --tlx-card-shadow: 0 8px 24px rgba(13, 55, 86, .10);
  --tlx-shadow-lg: 0 16px 40px rgba(13, 55, 86, .14);
  --tlx-transition: all .3s ease-in;
  --tlx-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  container-type: inline-size;
  width: 100%;
  font-family: var(--tlx-font);
  color: var(--tlx-body);
  text-align: left;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#tlx-pc *, #tlx-pc *::before, #tlx-pc *::after { box-sizing: border-box; }
#tlx-pc p, #tlx-pc ul, #tlx-pc li { margin: 0; padding: 0; }
#tlx-pc p, #tlx-pc li, #tlx-pc span, #tlx-pc button, #tlx-pc a, #tlx-pc s, #tlx-pc b, #tlx-pc strong {
  font-family: var(--tlx-font);
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
}
#tlx-pc ul { list-style: none; }
#tlx-pc li::before, #tlx-pc li::after { content: none; }
#tlx-pc svg { display: block; }

/* ---------- layout ---------- */
#tlx-pc .tlx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(min(360px, 100%), calc((100% - 32px) / 2)), 1fr));
  grid-auto-rows: auto;
  column-gap: 32px;
  row-gap: 0;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 0 28px;
}
#tlx-pc .tlx-card {
  grid-row: span 6;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--tlx-card-shadow);
}
#tlx-pc .tlx-card-featured { box-shadow: var(--tlx-shadow-lg); outline: 1px solid var(--tlx-navy); }
#tlx-pc .tlx-head {
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
  background-color: rgb(235, 240, 245);
  color: var(--tlx-heading);
  padding: 16px 28px 12px;
  border-radius: 16px 16px 0 0;
}
#tlx-pc .tlx-head-dark { background: var(--tlx-navy); color: #fff; }

/* No subgrid support: fall back to plain stacked cards */
@supports not (grid-template-rows: subgrid) {
  #tlx-pc .tlx-card, #tlx-pc .tlx-head { display: flex; flex-direction: column; }
  #tlx-pc .tlx-foot { margin-top: auto; }
}

/* ---------- header ---------- */
#tlx-pc .tlx-intro { display: flex; flex-direction: column; padding-bottom: 8px; }
#tlx-pc .tlx-eyebrow-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 4px; }
#tlx-pc .tlx-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: inherit; line-height: 1.5; }
#tlx-pc .tlx-badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  padding: 8px 14px; border-radius: 6px; background: var(--tlx-teal); color: #fff;
}
#tlx-pc .tlx-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; line-height: 1.25; color: inherit; }
#tlx-pc .tlx-desc { font-size: 12px; line-height: 1.5; color: inherit; }

#tlx-pc .tlx-price-block { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
#tlx-pc .tlx-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#tlx-pc .tlx-price { font-size: 40px; font-weight: 800; line-height: 1; color: inherit; }
#tlx-pc .tlx-price-retail { font-size: 22px; font-weight: 400; color: var(--tlx-muted); text-decoration: line-through; }
#tlx-pc .tlx-price-retail:empty { display: none; }
#tlx-pc .tlx-head-dark .tlx-price-retail { color: #fff; }
#tlx-pc .tlx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#tlx-pc .tlx-chip {
  display: inline-flex; align-items: baseline; padding: 6px 12px; border-radius: 8px;
  background: #fff; border: 1px solid var(--tlx-gray-200); color: var(--tlx-navy);
  font-size: 12px; font-weight: 400; line-height: 1.5;
}
#tlx-pc .tlx-head-dark .tlx-chip { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
#tlx-pc .tlx-head-dark .tlx-chip-save { background: var(--tlx-teal); border-color: var(--tlx-teal); }

#tlx-pc .tlx-dur { container: tlx-dur / inline-size; display: flex; flex-direction: column; }
#tlx-pc .tlx-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: inherit; line-height: 1.5; }
#tlx-pc .tlx-label.tlx-muted { color: var(--tlx-label); }

/* duration pills */
#tlx-pc .tlx-pills { display: flex; flex-wrap: nowrap; gap: 8px; padding-bottom: 0px; }
#tlx-pc .tlx-pill-wrap { position: relative; flex: 0 0 auto; min-width: 0; display: flex; justify-content: center; }
#tlx-pc .tlx-pill {
  -webkit-appearance: none; appearance: none; margin: 0;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .3em;
  padding: 7px 14px; border-radius: 9999px; cursor: pointer; transition: background-color .3s ease-in, color .3s ease-in;
  border: 1px solid var(--tlx-navy); background: #fff; color: var(--tlx-navy);
  font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; box-shadow: none;
}
#tlx-pc .tlx-pill:hover { background: var(--tlx-subtle); }
#tlx-pc .tlx-pill.is-active, #tlx-pc .tlx-pill.is-active:hover { background: var(--tlx-navy); color: #fff; }
#tlx-pc .tlx-pill:focus { outline: none; }
#tlx-pc .tlx-pill:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 158, 226, .35); }
#tlx-pc .tlx-dur-unit { display: none; text-transform: uppercase; letter-spacing: inherit; }

/* Keep all 5 pills on one line: tighten as the pill row narrows */
@container tlx-dur (max-width: 440px) {
  #tlx-pc .tlx-pills { gap: 6px; }
  #tlx-pc .tlx-pill-wrap { flex: 1 1 0; }
  #tlx-pc .tlx-pill { padding: 7px 2px; }
}
@container tlx-dur (max-width: 330px) {
  #tlx-pc .tlx-pill { font-size: 13px; }
  #tlx-pc .tlx-pill-unit { display: none; }
  #tlx-pc .tlx-dur-unit { display: inline; }
}
#tlx-pc .tlx-callout {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
}
#tlx-pc .tlx-callout-arrow { width: 10px; height: 10px; background: var(--tlx-teal); transform: rotate(45deg); margin-bottom: -6px; }
#tlx-pc .tlx-callout-text { padding: 5px 10px; border-radius: 6px; background: var(--tlx-teal); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.5; white-space: nowrap; }

/* mastery fixed duration */
#tlx-pc .tlx-fixed-dur {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 12px; min-height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .5);
  font-size: 12px; font-weight: 700; color: #fff; text-align: center;
}

/* ---------- includes ---------- */
#tlx-pc .tlx-section { padding: 10px 28px 12px; display: flex; flex-direction: column; }
#tlx-pc .tlx-section-inc { padding-bottom: 0; }
#tlx-pc .tlx-includes { display: flex; flex-direction: column; gap: 2px; }
#tlx-pc .tlx-includes li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.35; color: var(--tlx-body); }
#tlx-pc .tlx-check { flex-shrink: 0; margin-top: 1px; stroke: var(--tlx-teal-dark); }
#tlx-pc .tlx-pg { display: inline-flex; align-items: center; gap: 6px; }
#tlx-pc .tlx-pg strong, #tlx-pc .tlx-daysave strong { font-weight: 700; color: var(--tlx-heading); }

/* Font sizes locked so host page CSS can't resize them: checklist 14px, add-on labels 13px */
#tlx-pc .tlx-includes li,
#tlx-pc .tlx-includes li > span,
#tlx-pc .tlx-includes li strong { font-size: 14px !important; }
#tlx-pc .tlx-addon-label,
#tlx-pc .tlx-addon-label > span:not(.tlx-tip) { font-size: 13px !important; }
#tlx-pc .tlx-i { font-size: 10px !important; }
#tlx-pc .tlx-tip-body, #tlx-pc .tlx-tip-body span { font-size: 12px !important; }

/* ---------- tooltips ---------- */
#tlx-pc .tlx-tip { position: relative; display: inline-flex; cursor: help; outline: none; }
#tlx-pc .tlx-i {
  width: 16px; height: 16px; border-radius: 50%; background: var(--tlx-gray-200); color: var(--tlx-heading);
  font-size: 10px; font-weight: 700; font-style: normal; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; user-select: none;
}
#tlx-pc .tlx-tip:focus-visible .tlx-i { box-shadow: 0 0 0 3px rgba(0, 158, 226, .35); }
#tlx-pc .tlx-tip-body {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: 260px; max-width: 80vw; background: var(--tlx-navy); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal;
  padding: 12px 14px; border-radius: 10px; box-shadow: var(--tlx-shadow-lg); z-index: 100;
  pointer-events: none; display: none; flex-direction: column; gap: 3px;
}
#tlx-pc .tlx-tip-body span { color: #fff; font-size: 12px; font-weight: 400; }
#tlx-pc .tlx-tip:hover .tlx-tip-body,
#tlx-pc .tlx-tip:focus .tlx-tip-body,
#tlx-pc .tlx-tip.is-open .tlx-tip-body { display: flex; }

/* ---------- add-ons ---------- */
#tlx-pc .tlx-addons { display: flex; flex-direction: column; gap: 4px; }
#tlx-pc .tlx-addon {
  display: flex; align-items: center; gap: 10px; padding: 4px 12px; border-radius: 10px; cursor: pointer;
  transition: var(--tlx-transition); border: 1.5px solid var(--tlx-gray-200); background: #fff; outline: none;
  -webkit-user-select: none; user-select: none;
}
#tlx-pc .tlx-addon.is-on { border-color: var(--tlx-navy); background: var(--tlx-subtle); }
#tlx-pc .tlx-addon.is-disabled { cursor: not-allowed; opacity: .55; }
#tlx-pc .tlx-addon:focus-visible, #tlx-pc .tlx-upsell:focus-visible { box-shadow: 0 0 0 3px rgba(0, 158, 226, .35); }
#tlx-pc .tlx-box {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--tlx-gray-300); background: #fff; transition: var(--tlx-transition);
}
#tlx-pc .tlx-box svg { visibility: hidden; }
#tlx-pc .is-on > .tlx-box { border-color: var(--tlx-navy); background: var(--tlx-navy); }
#tlx-pc .is-on > .tlx-box svg { visibility: visible; }
#tlx-pc .tlx-addon-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tlx-pc .tlx-addon-label { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--tlx-heading); }
#tlx-pc .tlx-addon-label .tlx-tip { vertical-align: -3px; margin-left: 6px; }
#tlx-pc .tlx-addon-note { font-size: 12px; font-style: italic; color: var(--tlx-muted); }
#tlx-pc .tlx-addon-note:empty { display: none; }
#tlx-pc .tlx-addon-price { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
#tlx-pc .tlx-addon-price s { font-size: 12px; text-decoration: line-through; color: var(--tlx-muted); }
#tlx-pc .tlx-addon-price b { font-size: 14px; font-weight: 700; color: var(--tlx-heading); }

/* USMLE upsell (mastery card) */
#tlx-pc .tlx-upsell {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 2px;
  border: 2px solid var(--tlx-teal); border-radius: 14px; cursor: pointer; outline: none;
  background: #E4F5F3; /* teal 12% on white */
  background: color-mix(in oklch, var(--tlx-teal) 12%, white);
  transition: var(--tlx-transition); -webkit-user-select: none; user-select: none;
}
#tlx-pc .tlx-upsell.is-on { border-color: var(--tlx-navy); background: var(--tlx-subtle); }
#tlx-pc .tlx-upsell-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tlx-pc .tlx-upsell-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#tlx-pc .tlx-upsell-title { font-size: 14px !important; font-weight: 700; color: var(--tlx-heading); line-height: 1.4; }
#tlx-pc .tlx-off { display: inline-flex; align-items: center; white-space: nowrap; padding: 4px 8px; border-radius: 6px; background: var(--tlx-coral-dark); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; }
#tlx-pc .tlx-upsell-desc { font-size: 12px; line-height: 1.4; color: var(--tlx-body); }
#tlx-pc .tlx-upsell-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
#tlx-pc .tlx-upsell-price b { font-size: 16px; font-weight: 800; color: var(--tlx-heading); }
#tlx-pc .tlx-upsell-price > span { font-size: 12px; color: var(--tlx-muted); }
#tlx-pc .tlx-upsell-price s { text-decoration: line-through; color: var(--tlx-muted); }

/* ---------- footer ---------- */
#tlx-pc .tlx-foot { padding: 12px 28px 12px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--tlx-gray-200); background: var(--tlx-subtle-foot); border-radius: 0 0 16px 16px; }
#tlx-pc .tlx-total { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#tlx-pc .tlx-total > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tlx-heading); }
#tlx-pc .tlx-total-amt { display: flex; align-items: center; gap: 8px; }
#tlx-pc .tlx-total-amt s { font-size: 14px; text-decoration: line-through; color: var(--tlx-muted); }
#tlx-pc .tlx-total-amt b { font-size: 28px; font-weight: 800; line-height: 1; color: var(--tlx-heading); }
#tlx-pc a.tlx-btn,
#tlx-pc a.tlx-btn:visited {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px;
  padding: 13px 30px; border-radius: 30px; border: 2px solid transparent;
  background: var(--tlx-btn); color: #fff !important; text-decoration: none !important;
  font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; transition: var(--tlx-transition);
}
#tlx-pc a.tlx-btn:hover, #tlx-pc a.tlx-btn:focus {
  background: #1E8479; /* #26A699 80% + black */
  background: color-mix(in oklch, var(--tlx-btn) 80%, black);
  color: #fff !important;
}
#tlx-pc a.tlx-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 158, 226, .35); }

#tlx-pc .tlx-disclaimer {
  grid-column: -2 / -1; margin: 10px 0 0; padding: 0 4px;
  font-size: 12px; line-height: 1.5; color: var(--tlx-muted); text-align: center; text-wrap: pretty;
}

/* ---------- single column (narrow container) ---------- */
@container (max-width: 751px) {
  #tlx-pc .tlx-card { margin-bottom: 24px; }
  #tlx-pc .tlx-card-featured { margin-bottom: 0; }
}
@media (max-width: 575px) {
  #tlx-pc .tlx-grid { padding-top: 16px; }
  #tlx-pc .tlx-head { padding: 14px 18px 10px; }
  #tlx-pc .tlx-section { padding-left: 18px; padding-right: 18px; }
  #tlx-pc .tlx-foot { padding-left: 18px; padding-right: 18px; }
  #tlx-pc .tlx-price { font-size: 36px; }
  #tlx-pc .tlx-upsell { flex-wrap: wrap; }
  #tlx-pc .tlx-upsell-price { flex-direction: row; align-items: baseline; gap: 8px; width: 100%; padding-left: 30px; }
}
