/* Epoxyset Product Finder — embeddable widget. Brand: teal + deep indigo. */
:root {
  --teal: #12B5A6;
  --teal-dark: #0E9C90;
  --teal-tint: #e4f6f3;
  --teal-tint-2: #d3f0ec;
  --blue: #20299B;            /* deep brand indigo */
  --blue-bright: #2f39c9;
  --blue-tint: #ecedfa;
  --ink: #1b2330;
  --muted: #6a7686;
  --line: #e8ecf1;
  --line-2: #dfe4ea;
  --bg: #eef1f6;             /* page behind the widget */
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(20,40,80,.06), 0 4px 14px rgba(20,40,80,.05);
  --shadow-md: 0 6px 18px rgba(20,40,80,.10), 0 18px 44px rgba(20,40,80,.08);
  --shadow-lg: 0 24px 70px rgba(20,40,80,.22);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-round: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(18,181,166,.08), transparent 60%),
    var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* embedded mode: transparent page background so the widget blends into the
   host page (the cards keep their own white surfaces). */
html.embedded, html.embedded body { background: transparent; }
html.embedded .app { padding-top: 6px; }

/* ---- app shell (the embeddable card) ---- */
.app {
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}
@media (min-width: 720px) { .app { padding: 32px 28px 48px; } }

.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===================== wizard ===================== */
.wizard {
  position: relative; overflow: hidden;
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 30px 28px 24px;
}
.wizard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue-bright));
}
@media (max-width: 560px) { .wizard { padding: 22px 16px 18px; } }
.wizard-head { margin-bottom: 26px; }
.progress { height: 7px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--blue-bright)); transition: width .4s cubic-bezier(.4,0,.2,1); }
.wizard-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.step-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.match-count { font-size: 12.5px; font-weight: 700; color: var(--teal-dark);
  background: var(--teal-tint); padding: 4px 11px; border-radius: 999px; }

.q-head { text-align: center; margin-bottom: 24px; }
.q-title { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 7px; line-height: 1.18; color: var(--blue); font-weight: 800; letter-spacing: -.01em; }
.q-help { color: var(--muted); margin: 0; font-size: 14.5px; }

.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 540px) { .options { grid-template-columns: 1fr; } }
.option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 15px 16px; cursor: pointer; transition: all .14s ease; font: inherit; color: inherit;
}
.option:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.option:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.option.selected { border-color: var(--teal); background: var(--teal-tint); box-shadow: 0 0 0 3px rgba(18,181,166,.16); }
.opt-icon { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; background: var(--teal-tint); border-radius: 11px; color: var(--teal-dark); transition: all .14s; }
.opt-icon svg { width: 23px; height: 23px; }
.option:hover .opt-icon, .option.selected .opt-icon { background: #fff; color: var(--teal); }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-label { font-weight: 700; font-size: 15px; color: var(--ink); }
.opt-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.opt-check { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.option.selected .opt-check { background: var(--teal); border-color: var(--teal); }

.wizard-nav { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.wizard-nav .spacer { flex: 1; }
.browse-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 2px; }

/* ===================== buttons ===================== */
.btn { border: 0; border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; font-family: inherit; transition: all .14s ease; white-space: nowrap; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 2px 10px rgba(18,181,166,.32); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(18,181,166,.4); }
.btn-ghost { background: var(--surface); color: var(--blue); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-tint); }
.btn-text { background: none; color: var(--muted); padding: 11px 10px; }
.btn-text:hover { color: var(--ink); }
.btn-text.light { color: #bcd9ff; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; color: var(--teal-dark); cursor: pointer; font-size: inherit;
  font-weight: 700; font-family: inherit; padding: 0; }
.linklike:hover { text-decoration: underline; }

/* ===================== results ===================== */
.results-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 4px; }
.results-top h2 { margin: 0; font-size: 25px; color: var(--blue); font-weight: 800; letter-spacing: -.01em; }
.results-sub { color: var(--muted); margin: 6px 0 0; max-width: 620px; font-size: 14px; }
.answer-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 22px; }
.achip { background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.results-more { text-align: center; margin-top: 24px; }
.results-more .browse-hint { margin-top: 16px; }

/* ===================== cards ===================== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card.best { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(18,181,166,.22), var(--shadow-md); }
.ribbon { position: absolute; top: -10px; left: 16px; background: var(--teal); color: #fff; font-size: 10.5px;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 7px;
  box-shadow: 0 3px 8px rgba(18,181,166,.4); }
.card .cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: #0a7d72; font-weight: 800; }
.card .code { font-size: 20px; font-weight: 800; margin: 4px 0 0; color: var(--blue); }
.card .name { font-size: 13.5px; font-weight: 600; margin: 2px 0 9px; color: var(--ink); }
.fit { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; margin: 4px 0 10px; }
.fit-full { background: var(--teal-tint); color: var(--teal-dark); }
.fit-partial { background: #fbedd5; color: #8a5200; }
.fit .ci { width: 12px; height: 12px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 3px 0 11px; }
.reason { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border-radius: 6px; padding: 3px 8px; font-weight: 600; }
.reason .ci { width: 11px; height: 11px; flex-shrink: 0; }
.reason.met { background: var(--teal-tint); color: var(--teal-dark); }
.reason.miss { background: #eef1f5; color: #5a6573; }
.card .desc { font-size: 13px; color: var(--muted); margin: 0 0 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.specs { display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: 12px; margin: 0 0 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.specs span { color: var(--muted); }
.specs b { color: var(--blue); font-weight: 700; }
.card .actions { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmp-toggle { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.cmp-toggle input { accent-color: var(--teal); width: 15px; height: 15px; }

/* ===================== browse ===================== */
.browse-top { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.browse-top .search { flex: 1; }
.search input { width: 100%; padding: 14px 16px; font-size: 15px; border: 1.5px solid var(--line-2);
  border-radius: 12px; outline: none; font-family: inherit; background: var(--surface); transition: border-color .14s; }
.search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,181,166,.14); }
.layout { display: grid; grid-template-columns: 232px 1fr; gap: 26px; align-items: start; }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.facet { margin-top: 18px; }
.facet h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  font-size: 12.5px; cursor: pointer; transition: all .12s; font-family: inherit; color: var(--ink); }
.chip:hover { border-color: var(--teal); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip .n { opacity: .55; margin-left: 5px; font-variant-numeric: tabular-nums; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.count { font-weight: 700; color: var(--blue); }
.sort { font-size: 13px; color: var(--muted); }
.sort select { padding: 7px 10px; border-radius: 9px; border: 1.5px solid var(--line-2); background: #fff; margin-left: 6px; font-family: inherit; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* ===================== compare tray + modals ===================== */
.tray { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(680px, calc(100% - 32px));
  background: var(--blue); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 30; }
.tray-inner { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 12px 20px; }
#tray-label { font-weight: 600; font-size: 14px; }
.tray-actions { display: flex; gap: 8px; align-items: center; }

.modal { position: fixed; inset: 0; background: rgba(20,30,60,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 40; animation: fade .18s ease; }
.modal-card { background: #fff; border-radius: 18px; max-width: 940px; width: 100%; max-height: 88vh;
  overflow: auto; padding: 28px; position: relative; box-shadow: var(--shadow-lg); }
.modal-card.narrow { max-width: 440px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 26px;
  line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--ink); }
.modal h2 { margin-top: 0; color: var(--blue); }
.compare-table { display: grid; overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.compare-table .row { display: grid; grid-template-columns: 150px repeat(var(--cols), minmax(140px, 1fr)); border-bottom: 1px solid var(--line); }
.compare-table .row:last-child { border-bottom: 0; }
.compare-table .row > div { padding: 10px 12px; font-size: 13px; }
.compare-table .row.head > div { background: var(--blue); color: #fff; font-weight: 700; }
.compare-table .row .k { color: var(--muted); font-weight: 600; background: var(--surface-2); }
.compare-table .row:nth-child(even) > div:not(.k) { background: var(--surface-2); }
.compare-table a { color: var(--teal-dark); font-weight: 700; }
@media (max-width: 560px) {
  .modal-card { padding: 22px 14px; }
  /* fixed column widths so the table overflows and scrolls instead of clipping */
  .compare-table { -webkit-overflow-scrolling: touch; }
  .compare-table .row { grid-template-columns: 104px repeat(var(--cols), 132px); }
}

.quote-product { color: var(--muted); margin-top: -8px; font-weight: 600; }
.quote-form { margin-top: 8px; }
.quote-form label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.quote-form input, .quote-form textarea { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line-2);
  border-radius: 9px; font-size: 14px; font-family: inherit; margin-top: 5px; font-weight: 400; }
.quote-form input:focus, .quote-form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,181,166,.14); }
.quote-error { background: #fdecec; color: #b3261e; font-size: 12.5px; font-weight: 600;
  padding: 9px 12px; border-radius: 9px; margin: 0 0 12px; }
.fineprint { font-size: 11px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.quote-done { text-align: center; padding: 24px 0; }
.quote-done .check { width: 54px; height: 54px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-dark);
  font-size: 28px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }

/* ===================== motion & micro-refinements ===================== */
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.grid .card { animation: cardIn .42s cubic-bezier(.16,.84,.44,1) both; }
.grid .card:nth-child(2) { animation-delay: .04s; }
.grid .card:nth-child(3) { animation-delay: .08s; }
.grid .card:nth-child(4) { animation-delay: .12s; }
.grid .card:nth-child(5) { animation-delay: .16s; }
.grid .card:nth-child(n+6) { animation-delay: .2s; }

@keyframes optIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.options .option { animation: optIn .32s cubic-bezier(.16,.84,.44,1) both; }
.options .option:nth-child(2) { animation-delay: .035s; }
.options .option:nth-child(3) { animation-delay: .07s; }
.options .option:nth-child(4) { animation-delay: .105s; }
.options .option:nth-child(5) { animation-delay: .14s; }
.options .option:nth-child(6) { animation-delay: .175s; }
.q-head { animation: optIn .3s ease both; }

@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.975); } to { opacity: 1; transform: none; } }
.modal-card { animation: popIn .22s cubic-bezier(.16,.84,.44,1); }
@keyframes trayIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.tray { animation: trayIn .26s cubic-bezier(.16,.84,.44,1); }

@keyframes checkPop { from { transform: scale(.3); } to { transform: scale(1); } }
.option.selected .opt-check { animation: checkPop .18s cubic-bezier(.3,1.4,.5,1); }

/* tactile button / control press */
.btn:active { transform: translateY(1px) scale(.992); }
.chip:active, .option:active { transform: scale(.99); }

/* consistent, on-brand focus rings */
.btn:focus-visible, .linklike:focus-visible, .chip:focus-visible,
.option:focus-visible, .navlink:focus-visible,
.search input:focus-visible, .sort select:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(18,181,166,.35);
}
.option:focus-visible { box-shadow: 0 0 0 3px rgba(18,181,166,.22); }

/* a touch more depth + life */
.progress-bar { box-shadow: 0 0 12px rgba(18,181,166,.45); }
.card:hover { border-color: #cfe9e5; }
.card.best:hover { border-color: var(--teal); }
.ribbon { letter-spacing: .06em; }
.achip { transition: transform .12s ease; }
.reason, .fit, .opt-icon, .opt-check { transition: all .15s ease; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
