:root {
  --scs-green: #16834f;
  --scs-green-dark: #0f6b3f;
  --scs-lime: #79bd3f;
  --scs-paper: #f6fbf5;
  --scs-soft: #edf7ef;
  --scs-border: #cfe4d5;
  --scs-text: #24503a;
  --scs-muted: #607b6d;
  --scs-white: #fff;
  --scs-danger: #b42318;
}

#scs-contact-widget,
#scs-contact-widget * { box-sizing: border-box; }

#scs-contact-widget {
  position: fixed;
  z-index: 2147483000;
  right: 20px;
  bottom: 20px;
  color: var(--scs-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#scs-contact-widget[data-position="left"] { right: auto; left: 20px; }

#scs-contact-widget button,
#scs-contact-widget input,
#scs-contact-widget select,
#scs-contact-widget textarea,
#scs-contact-widget a,
#scs-contact-widget label {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.scs-widget-launcher {
  position: relative;
  min-width: 170px;
  height: 64px;
  padding: 6px 20px 6px 7px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--scs-white);
  background: var(--scs-green);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(15,107,63,.25);
  font-size: 15px;
  font-weight: 780;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.scs-widget-launcher:hover {
  background: var(--scs-green-dark);
  box-shadow: 0 19px 44px rgba(15,107,63,.3);
  transform: translateY(-2px);
}

.scs-widget-launcher:focus-visible { outline: 3px solid #f5bd16; outline-offset: 3px; }

.scs-widget-launcher-avatar {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--scs-white);
  border-radius: 50%;
}

.scs-widget-launcher-avatar img { width: 43px; height: 43px; object-fit: contain; }

.scs-widget-badge {
  position: absolute;
  top: 2px;
  right: 5px;
  width: 15px;
  height: 15px;
  background: #f32d47;
  border: 3px solid var(--scs-white);
  border-radius: 50%;
}

.scs-widget-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 440px;
  max-width: calc(100vw - 28px);
  max-height: min(740px, calc(100vh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--scs-text);
  background: var(--scs-white);
  border: 1px solid var(--scs-border);
  border-radius: 10px;
  box-shadow: 0 30px 75px rgba(25,74,48,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.985);
  transform-origin: right bottom;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.scs-widget-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.scs-widget-header {
  min-height: 78px;
  padding: 12px 15px 12px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  background: var(--scs-paper);
  border-bottom: 1px solid var(--scs-border);
}

.scs-widget-brand-logo {
  width: 76px;
  height: 50px;
  flex: 0 0 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.scs-widget-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.scs-widget-title { flex: 1; min-width: 0; }
.scs-widget-title strong { display: block; color: var(--scs-green-dark); font-size: 17px; font-weight: 800; line-height: 1.15; }
.scs-widget-status { margin-top: 5px; display: flex; align-items: center; gap: 7px; color: var(--scs-muted); font-size: 11px; }
.scs-widget-status-dot { width: 7px; height: 7px; flex: 0 0 7px; background: var(--scs-lime); border-radius: 50%; box-shadow: 0 0 0 4px rgba(121,189,63,.13); }

.scs-widget-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--scs-muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.scs-widget-close:hover { color: var(--scs-green-dark); background: var(--scs-soft); }
.scs-widget-close:focus-visible { outline: 2px solid var(--scs-green); outline-offset: 2px; }

.scs-widget-progress { height: 4px; flex: 0 0 auto; background: #e5f0e8; }
.scs-widget-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--scs-lime), var(--scs-green)); transition: width .2s ease; }
.scs-widget-content { overflow-y: auto; overscroll-behavior: contain; background: var(--scs-white); scrollbar-color: #a9cbb5 transparent; scrollbar-width: thin; }
.scs-widget-body { padding: 22px; }

.scs-agent-row { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
.scs-agent-row > img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 3px;
  object-fit: contain;
  background: var(--scs-soft);
  border: 1px solid var(--scs-border);
  border-radius: 50%;
}

.scs-bubble {
  flex: 1;
  padding: 12px 14px;
  color: var(--scs-text);
  background: var(--scs-paper);
  border: 1px solid var(--scs-border);
  border-radius: 3px 10px 10px 10px;
  font-size: 13px;
  line-height: 1.5;
}

.scs-start-quote {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  color: var(--scs-white);
  background: var(--scs-green);
  border: 0;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 780;
  cursor: pointer;
}

.scs-start-quote:hover,
.scs-btn.primary:hover { background: var(--scs-green-dark); }

.scs-or { margin: 18px 0 10px; color: var(--scs-muted); font-size: 11px; text-align: center; }
.scs-contact-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.scs-contact-actions a {
  padding: 10px 5px;
  color: var(--scs-green-dark);
  background: var(--scs-white);
  border: 1px solid var(--scs-border);
  border-radius: 2px;
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.scs-contact-actions a:hover { color: var(--scs-white); background: var(--scs-green); border-color: var(--scs-green); }
.scs-widget-body h3 { margin: 20px 0 9px; color: var(--scs-green-dark); font-size: 12px; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.scs-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.scs-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.scs-field.wide { grid-column: 1 / -1; width: 100%; margin-top: 8px; }
.scs-field > span { color: var(--scs-muted); font-size: 11px; font-weight: 720; }

.scs-field input,
.scs-field select,
.scs-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  color: var(--scs-text);
  background: #f9fcf9;
  border: 1px solid #cbded1;
  border-radius: 2px;
  font-size: 13px;
  outline: none;
}

.scs-field textarea { resize: vertical; }
.scs-field input:focus,
.scs-field select:focus,
.scs-field textarea:focus { background: var(--scs-white); border-color: var(--scs-green); box-shadow: 0 0 0 3px rgba(22,131,79,.1); }

.scs-date-control { position: relative; display: block; }
.scs-date-control > input[type="text"] { padding-right: 46px; }
.scs-calendar-button {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  color: var(--scs-green-dark);
  background: var(--scs-soft);
  border: 0;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
}

.scs-date-control > input.scs-native-date {
  position: absolute;
  z-index: 0;
  top: 4px;
  right: 4px;
  width: 1px;
  min-width: 1px;
  max-width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.scs-choice-list { display: grid; gap: 9px; }
#scs-contact-widget .scs-choice-list label {
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--scs-white);
  border: 1px solid var(--scs-border);
  border-radius: 3px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

#scs-contact-widget .scs-choice-list label:hover { border-color: #99c9aa; }
#scs-contact-widget .scs-choice-list label:has(input:checked) { background: var(--scs-soft); border-color: var(--scs-green); box-shadow: inset 4px 0 0 var(--scs-green); }
#scs-contact-widget .scs-choice-list input[type="radio"] {
  appearance: auto;
  -webkit-appearance: radio;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--scs-green);
}

.scs-choice-list span { display: flex; flex-direction: column; gap: 3px; }
#scs-contact-widget .scs-choice-list strong { display: block; color: var(--scs-text); font-size: 13px; font-weight: 780; line-height: 1.25; }
#scs-contact-widget .scs-choice-list small { display: block; color: var(--scs-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }

.scs-form-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }
.scs-btn { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 2px; font-size: 13px; font-weight: 780; cursor: pointer; }
.scs-btn.primary { color: var(--scs-white); background: var(--scs-green); }
.scs-btn.secondary { color: var(--scs-green-dark); background: var(--scs-soft); border: 1px solid var(--scs-border); }
.scs-btn:focus-visible,
.scs-start-quote:focus-visible { outline: 3px solid rgba(22,131,79,.2); outline-offset: 2px; }

.scs-cargo-row { position: relative; margin: 0 0 15px; padding: 14px; background: #fbfdfb; border: 1px solid var(--scs-border); border-radius: 4px; }
.scs-cargo-row legend { padding: 0 6px; color: var(--scs-green-dark); font-size: 11px; font-weight: 780; }
.scs-remove-cargo { position: absolute; top: -10px; right: 9px; padding: 3px 6px; color: var(--scs-danger); background: var(--scs-white); border: 0; font-size: 11px; cursor: pointer; }
.scs-add-cargo { width: 100%; padding: 10px; color: var(--scs-green-dark); background: var(--scs-soft); border: 1px dashed var(--scs-green); border-radius: 2px; font-size: 12px; font-weight: 780; cursor: pointer; }
.scs-calculation { margin: 10px 0 0; color: var(--scs-muted); font-size: 11px; text-align: right; }

.scs-check-grid { margin: 15px 0; display: grid; grid-template-columns: 1fr; gap: 9px; }
.scs-check-grid label,
.scs-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--scs-text); font-size: 12px; line-height: 1.4; }
#scs-contact-widget .scs-check-grid input[type="checkbox"],
#scs-contact-widget .scs-consent input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--scs-green);
}

.scs-conditional { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.scs-summary { padding: 4px 15px 15px; background: var(--scs-paper); border: 1px solid var(--scs-border); border-radius: 3px; }
.scs-summary h3 { margin-bottom: 4px; }
.scs-summary p,
.scs-summary ul { margin: 0; font-size: 12px; line-height: 1.5; }
.scs-summary ul { padding-left: 18px; }
.scs-inline-edit { margin-left: 5px; padding: 2px 7px; color: var(--scs-green-dark); background: var(--scs-white); border: 1px solid var(--scs-green); border-radius: 2px; font-size: 10px; font-weight: 780; cursor: pointer; }
.scs-consent { margin-top: 15px; }
.scs-centered { text-align: center; }
.scs-centered .scs-agent-row { text-align: left; }
.scs-spinner { width: 34px; height: 34px; margin: 25px auto; border: 4px solid #dcefe3; border-top-color: var(--scs-green); border-radius: 50%; animation: scs-spin .7s linear infinite; }
.scs-text-link { display: block; margin-top: 14px; color: var(--scs-green-dark); font-size: 12px; }
.scs-result-icon { width: 54px; height: 54px; margin: 2px auto 18px; display: grid; place-items: center; border-radius: 50%; font-size: 26px; font-weight: 800; }
.scs-result-icon.success { color: var(--scs-green-dark); background: var(--scs-soft); border: 1px solid var(--scs-border); }
.scs-result-icon.error { color: var(--scs-danger); background: #fff4f2; border: 1px solid #f2d1cc; }

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

@media (max-width: 520px) {
  #scs-contact-widget { right: 12px; bottom: 12px; }
  #scs-contact-widget[data-position="left"] { left: 12px; }
  .scs-widget-launcher { min-width: 60px; width: 60px; height: 60px; padding: 5px; }
  .scs-widget-launcher-avatar { width: 48px; height: 48px; flex-basis: 48px; }
  .scs-widget-launcher-avatar img { width: 41px; height: 41px; }
  .scs-widget-launcher-text { display: none; }
  .scs-widget-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 80px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 92px);
    border-radius: 8px;
    transform-origin: center bottom;
  }
  .scs-widget-header { min-height: 70px; padding: 10px 11px 10px 14px; }
  .scs-widget-brand-logo { width: 66px; height: 44px; flex-basis: 66px; }
  .scs-widget-title strong { font-size: 16px; }
  .scs-widget-status { font-size: 10px; }
  .scs-widget-body { padding: 17px; }
  .scs-agent-row > img { width: 34px; height: 34px; flex-basis: 34px; }
  .scs-bubble { padding: 11px 12px; font-size: 12px; }
  .scs-grid,
  .scs-conditional { grid-template-columns: 1fr; }
  .scs-field.wide { grid-column: auto; }
  .scs-form-actions { position: sticky; bottom: 0; margin: 20px -17px -17px; padding: 12px 17px; background: rgba(255,255,255,.96); border-top: 1px solid var(--scs-border); }
  .scs-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #scs-contact-widget * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
