/* =============================================
   Sustainable Lifecycle Scan – Stylesheet
   ============================================= */

/* ---- Reset / scope ---- */
.sls-root * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sls-root {
  font-family: 'Assistant', 'Segoe UI', system-ui, sans-serif;
  color: #1a2520;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 3rem;
}

/* ---- Google Font (loaded inline via JS if available) ---- */
@import url('https://fonts.googleapis.com/css2?family=Yanone+Kaffeesatz:wght@300;400;500;600;700&family=Assistant:wght@300;400;500;600;700&display=swap');

/* =============================================
   HEADER
   ============================================= */
.sls-header {
  padding: 2.5rem 2rem 2rem;
  border-bottom: 1px solid #e4ede9;
}

.sls-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a6645;
  background: #e8f5ee;
  border: 1px solid #b6ddc8;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 1rem;
}

.sls-header__title {
  font-family: 'Yanone Kaffeesatz', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: #0f2a1d;
  margin-bottom: .5rem;
}

.sls-header__sub {
  font-size: 1rem;
  color: #4a6358;
  max-width: 620px;
  line-height: 1.6;
}

/* =============================================
   INPUT SECTION
   ============================================= */
.sls-input-section {
  padding: 2rem 2rem 1.5rem;
  background: #f8faf9;
  border-bottom: 1px solid #e4ede9;
}

.sls-input-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 680px) {
  .sls-input-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Input card ---- */
.sls-input-card {
  background: #fff;
  border: 1px solid #d1e4d9;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}

.sls-input-card:focus-within {
  border-color: #2d9e6b;
  box-shadow: 0 0 0 3px rgba(45,158,107,.12);
}

.sls-input-card--b {
  opacity: .45;
  pointer-events: none;
  transition: opacity .3s;
}

.sls-input-card--b.sls-active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Label ---- */
.sls-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: .75rem;
}

.sls-label__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sls-label__dot--a { background: #2d9e6b; }
.sls-label__dot--b { background: #1565c0; }

/* ---- Search wrap + autocomplete ---- */
.sls-search-wrap {
  position: relative;
}

.sls-input {
  width: 100%;
  border: 1px solid #ccddd5;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #0f2a1d;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}

.sls-input:focus {
  border-color: #2d9e6b;
}

.sls-input::placeholder { color: #92aaa0; }

.sls-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #ccddd5;
  border-radius: 9px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: none;
}

.sls-suggest.open { display: block; }

.sls-suggest-item {
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
  color: #1a2520;
  transition: background .15s;
}

.sls-suggest-item:hover,
.sls-suggest-item.active {
  background: #e8f5ee;
  color: #1a6645;
}

/* ---- Toggle ---- */
.sls-compare-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2.5rem;
}

.sls-toggle-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.sls-toggle-cb { display: none; }

.sls-toggle-track {
  width: 44px;
  height: 24px;
  background: #c5d9cf;
  border-radius: 100px;
  position: relative;
  transition: background .25s;
}

.sls-toggle-cb:checked + .sls-toggle-track {
  background: #2d9e6b;
}

.sls-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.sls-toggle-cb:checked + .sls-toggle-track .sls-toggle-thumb {
  transform: translateX(20px);
}

.sls-toggle-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4a6358;
  text-align: center;
  line-height: 1.4;
  max-width: 80px;
}

/* ---- Buttons ---- */
.sls-action-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.sls-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s, opacity .2s;
}

.sls-btn:active { transform: scale(.98); }

.sls-btn--primary {
  background: #1a6645;
  color: #fff;
}

.sls-btn--primary:hover { background: #13512f; }
.sls-btn--primary:disabled { opacity: .5; cursor: default; }

.sls-btn--ghost {
  background: transparent;
  color: #3b5a4d;
  border: 1px solid #c5d9cf;
}

.sls-btn--ghost:hover { background: #e8f5ee; }

.sls-btn--outline-pdf {
  background: transparent;
  color: #1565c0;
  border: 1px solid #93b5e0;
  font-size: 13px;
  padding: 9px 20px;
}

.sls-btn--outline-pdf:hover { background: #e3edf8; }

.sls-btn--outline-contact {
  background: transparent;
  color: #1a6645;
  border: 1px solid #b6ddc8;
  font-size: 13px;
  padding: 9px 20px;
}

.sls-btn--outline-contact:hover { background: #e8f5ee; }

.sls-btn__icon { font-size: 11px; }

/* =============================================
   RESULTS
   ============================================= */
.sls-results {
  padding: 2rem;
}

/* ---- Score summary cards ---- */
.sls-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.sls-summary-card {
  border: 1px solid #d1e4d9;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.sls-summary-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e4ede9;
}

.sls-summary-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: #0f2a1d;
}

.sls-summary-card__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sls-summary-card__dot--a { background: #2d9e6b; }
.sls-summary-card__dot--b { background: #1565c0; }

.sls-summary-card__body {
  padding: 1.25rem;
}

.sls-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 1rem;
}

.sls-verdict--good    { background: #e2f5e8; color: #1a6645; }
.sls-verdict--medium  { background: #fff4e0; color: #8a5200; }
.sls-verdict--risk    { background: #fdeaea; color: #b91c1c; }

.sls-score-bar-wrap {
  margin-bottom: 1rem;
}

.sls-score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #4a6358;
  margin-bottom: 4px;
}

.sls-score-bar-track {
  height: 6px;
  background: #e4ede9;
  border-radius: 100px;
  overflow: hidden;
}

.sls-score-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.sls-score-bar-fill--good   { background: #2d9e6b; }
.sls-score-bar-fill--medium { background: #f59e0b; }
.sls-score-bar-fill--risk   { background: #ef4444; }

.sls-summary-meta {
  font-size: 13px;
  color: #4a6358;
  line-height: 1.6;
  margin-top: .75rem;
}

/* ---- Winnerbadge ---- */
.sls-winner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: #e2f5e8;
  color: #1a6645;
  border: 1px solid #b6ddc8;
  border-radius: 100px;
  padding: 3px 10px;
  margin-top: 8px;
}

/* ---- Matrix ---- */
.sls-matrix-section {
  margin-bottom: 2.5rem;
}

.sls-section-title {
  font-family: 'Yanone Kaffeesatz', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #e4ede9;
}

.sls-matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sls-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}

.sls-matrix th {
  background: #f2f8f4;
  font-weight: 600;
  font-size: 12px;
  color: #3b5a4d;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #d1e4d9;
}

.sls-matrix th:first-child {
  width: 160px;
  border-right: 1px solid #d1e4d9;
}

.sls-matrix td {
  padding: 9px 14px;
  border-bottom: 1px solid #edf3ef;
  vertical-align: middle;
}

.sls-matrix td:first-child {
  font-weight: 500;
  color: #1a2520;
  border-right: 1px solid #d1e4d9;
  white-space: nowrap;
}

.sls-matrix tr:last-child td { border-bottom: none; }

/* Score pill */
.sls-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
}

.sls-pill--low    { background: #e2f5e8; color: #155e36; }
.sls-pill--medium { background: #fff4e0; color: #854d0e; }
.sls-pill--high   { background: #fdeaea; color: #991b1b; }
.sls-pill--na     { background: #f2f4f3; color: #788c83; }

/* Score dot inside pill */
.sls-pill::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sls-pill--low::before    { background: #2d9e6b; }
.sls-pill--medium::before { background: #f59e0b; }
.sls-pill--high::before   { background: #ef4444; }
.sls-pill--na::before     { background: #b0bdb8; }

/* Two products: show two pills per cell */
.sls-cell-pair {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---- Advice & alternatives ---- */
.sls-advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.sls-advice-card {
  background: #fff;
  border: 1px solid #d1e4d9;
  border-radius: 14px;
  padding: 1.25rem;
}

.sls-advice-card__name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: .875rem;
}

.sls-advice-card ul {
  list-style: none;
  padding: 0;
}

.sls-advice-card li {
  font-size: 13.5px;
  color: #2c4238;
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.55;
  border-bottom: 1px solid #edf3ef;
}

.sls-advice-card li:last-child { border-bottom: none; }

.sls-advice-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #2d9e6b;
  font-size: 13px;
}

/* Risks */
.sls-risk-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  background: #fdeaea;
  color: #991b1b;
  border-radius: 6px;
  padding: 3px 9px;
  margin: 3px 4px 3px 0;
  font-weight: 500;
}

/* ---- Action bar ---- */
.sls-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e4ede9;
}

/* =============================================
   DISCLAIMER
   ============================================= */
.sls-disclaimer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f2f8f4;
  border: 1px solid #c5d9cf;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 12.5px;
  color: #4a6358;
  line-height: 1.6;
  margin: 0 2rem 2rem;
}

.sls-disclaimer svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2d9e6b;
}

.sls-disclaimer strong { color: #1a6645; }

/* =============================================
   LOADING SPINNER
   ============================================= */
.sls-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.sls-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #d1e4d9;
  border-top-color: #2d9e6b;
  border-radius: 50%;
  animation: sls-spin .7s linear infinite;
}

@keyframes sls-spin { to { transform: rotate(360deg); } }

.sls-loading-text {
  font-size: 14px;
  color: #4a6358;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 680px) {
  .sls-header,
  .sls-input-section,
  .sls-results,
  .sls-disclaimer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .sls-disclaimer { margin-left: 1rem; margin-right: 1rem; }

  .sls-compare-toggle {
    padding-top: 0;
    order: -1;
  }

  .sls-toggle-label {
    flex-direction: row;
    max-width: 100%;
  }

  .sls-toggle-text { max-width: none; text-align: left; }
}

/* =============================================
   URL INVOER
   ============================================= */
.sls-url-row {
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px dashed #d1e4d9;
}

.sls-url-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b8f7e;
  margin-bottom: .5rem;
}

.sls-url-label svg { flex-shrink: 0; color: #2d9e6b; }

.sls-url-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.sls-input--url {
  font-size: 13px;
  color: #1565c0;
  flex: 1;
  min-width: 0;
}

.sls-input--url::placeholder { color: #92aaa0; }

.sls-url-fetch-btn {
  flex-shrink: 0;
  background: #e8f5ee;
  color: #1a6645;
  border: 1px solid #b6ddc8;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}

.sls-url-fetch-btn:hover { background: #d0eddc; }
.sls-url-fetch-btn:disabled { opacity: .4; cursor: default; }
.sls-url-fetch-btn.loading { opacity: .6; cursor: wait; }

.sls-url-status {
  margin-top: 5px;
  font-size: 12px;
  min-height: 18px;
  line-height: 1.4;
}

.sls-url-status--ok    { color: #1a6645; }
.sls-url-status--error { color: #b91c1c; }
.sls-url-status--info  { color: #4a6358; }

/* ---- Productlink in resultaten ---- */
.sls-product-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #1565c0;
  text-decoration: none;
  border-bottom: 1px solid #93b5e0;
  padding-bottom: 1px;
  margin-top: 6px;
  transition: color .15s;
  word-break: break-all;
}

.sls-product-link:hover { color: #0d3c7a; }

.sls-product-link svg { flex-shrink: 0; }

/* ---- Alternatief-links in adviessectie ---- */
.sls-advice-card a {
  color: #1565c0;
  text-decoration: none;
  border-bottom: 1px solid #93b5e0;
}

.sls-advice-card a:hover { color: #0d3c7a; }

/* =============================================
   CONFIDENCE / BETROUWBAARHEID BADGES
   ============================================= */

/* Bronbadge boven verdict */
.sls-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: .625rem;
  letter-spacing: .03em;
}

.sls-source-badge--validated {
  background: #e2f5e8;
  color: #155e36;
  border: 1px solid #b6ddc8;
}

.sls-source-badge--ai {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.sls-source-badge--low {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* Waarschuwingsblok bovenaan resultaten */
.sls-confidence-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 13px;
  color: #7c2d12;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.sls-confidence-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #ea580c;
}

.sls-confidence-warning strong {
  color: #9a3412;
}

/* =============================================
   GEBRUIKSCONTEXT VELDEN
   ============================================= */
.sls-context-fields {
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px dashed #d1e4d9;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.sls-context-row {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.sls-context-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4a6358;
}

.sls-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #92aaa0;
  font-size: 11px;
}

.sls-context-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sls-ctx-btn {
  background: #f2f8f4;
  border: 1px solid #ccddd5;
  border-radius: 100px;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: #3b5a4d;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.sls-ctx-btn:hover:not(:disabled) {
  background: #e8f5ee;
  border-color: #2d9e6b;
  color: #1a6645;
}

.sls-ctx-btn--active {
  background: #1a6645;
  border-color: #1a6645;
  color: #fff !important;
}

.sls-ctx-btn:disabled {
  opacity: .4;
  cursor: default;
}

.sls-input--sm {
  font-size: 13px;
  padding: 7px 12px;
}

/* =============================================
   AI REDENERING / VERHAAL
   ============================================= */
.sls-reasoning {
  background: #f8faf9;
  border: 1px solid #d1e4d9;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sls-reasoning__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sls-reasoning__title svg { color: #2d9e6b; }

.sls-reasoning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
}

.sls-reasoning-phase {
  background: #fff;
  border: 1px solid #e4ede9;
  border-radius: 10px;
  padding: .875rem;
}

.sls-reasoning-phase__name {
  font-size: 11px;
  font-weight: 700;
  color: #1a6645;
  margin-bottom: .375rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sls-reasoning-phase__text {
  font-size: 12.5px;
  color: #2c4238;
  line-height: 1.55;
}

/* Conclusie blok */
.sls-conclusion {
  background: #fff;
  border: 2px solid #d1e4d9;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sls-conclusion--winner {
  border-color: #2d9e6b;
}

.sls-conclusion__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: .5rem;
}

.sls-conclusion__text {
  font-size: 14px;
  color: #1a2520;
  line-height: 1.65;
}

/* AI badge */
.sls-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: .75rem;
}

/* =============================================
   FUNCTIONELE EENHEID LABEL
   ============================================= */
.sls-functional-unit {
  font-size: 11px;
  color: #5c4f43;
  background: #f5efe6;
  border: 1px solid #dfd4c5;
  border-radius: 7px;
  padding: 4px 10px;
  margin-bottom: .75rem;
  line-height: 1.5;
}

/* =============================================
   P4 SOCIALE ANALYSE BLOK
   ============================================= */
.sls-p4-block {
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px dashed #d1e4d9;
}

.sls-p4-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #3b5a4d;
  margin-bottom: .375rem;
}

.sls-p4-text {
  font-size: 12.5px;
  color: #2c4238;
  line-height: 1.65;
}

/* =============================================
   VERBETERDE LAADANIMATIE
   ============================================= */
.sls-loading-phases {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: .75rem 0 .5rem;
}

.sls-lph {
  font-size: 11px;
  font-weight: 500;
  color: #92aaa0;
  background: #f2f8f4;
  border: 1px solid #d1e4d9;
  border-radius: 100px;
  padding: 3px 10px;
  transition: all .4s;
}

.sls-lph--active {
  color: #1a6645;
  background: #e2f5e8;
  border-color: #2d9e6b;
  font-weight: 700;
}

.sls-loading-sub {
  font-size: 11px;
  color: #92aaa0;
  margin-top: .25rem;
}
