.cs-widget,
.cs-widget * {
  box-sizing: border-box;
}

.cs-widget {
  --cs-blue: #075fbd;
  --cs-blue-dark: #064f9c;
  --cs-ink: #20252b;
  --cs-muted: #7a828b;
  --cs-line: #e2e6eb;
  --cs-panel-shadow: 0 16px 48px rgba(20, 31, 46, 0.2);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--cs-ink);
}

.cs-panel {
  position: fixed;
  z-index: 10001;
  right: 24px;
  bottom: 154px;
  display: flex;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 178px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(18, 32, 50, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--cs-panel-shadow);
}

.cs-panel[hidden],
.cs-conversation-form[hidden] {
  display: none;
}

.cs-panel-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: var(--cs-blue);
  color: #fff;
}

.cs-panel-header h2 {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.cs-close {
  display: grid;
  width: 30px;
  height: 34px;
  flex: 0 0 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.cs-close span,
.cs-close span::after {
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.cs-close span {
  position: relative;
  display: block;
  transform: rotate(45deg);
}

.cs-close span::after {
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  transform: rotate(90deg);
}

.cs-close:hover,
.cs-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.cs-panel-body {
  flex: 1;
  overflow: auto;
  padding: 22px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cs-panel-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cs-form-intro {
  margin: 0 0 18px;
  color: #545d66;
  font-size: 14px;
  line-height: 1.55;
}

.cs-field {
  display: grid;
  gap: 7px;
  margin: 0 0 15px;
  font-size: 13px;
  font-weight: 650;
}

.cs-field input,
.cs-field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #ccd3db;
  border-radius: 7px;
  background: #fff;
  color: var(--cs-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.cs-field textarea {
  min-height: 116px;
  resize: vertical;
}

.cs-field input::placeholder,
.cs-field textarea::placeholder {
  color: #9299a1;
}

.cs-field input:focus,
.cs-field textarea:focus {
  border-color: var(--cs-blue);
  outline: 3px solid rgba(7, 95, 189, 0.13);
}

.cs-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cs-form-note {
  min-height: 18px;
  margin: 0 0 10px;
  color: #555f69;
  font-size: 13px;
  line-height: 1.45;
}

.cs-form-note:empty {
  min-height: 5px;
  margin-bottom: 4px;
}

.cs-form-note.is-success {
  color: #16734a;
}

.cs-form-note.is-error {
  color: #b42318;
}

.cs-submit {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--cs-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cs-submit:hover,
.cs-submit:focus-visible {
  background: var(--cs-blue-dark);
  outline: 3px solid rgba(7, 95, 189, 0.2);
}

.cs-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.cs-whatsapp-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid #20a862;
  border-radius: 7px;
  background: #fff;
  color: #16824d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.cs-whatsapp-link:hover,
.cs-whatsapp-link:focus-visible {
  background: #f0fbf5;
  outline: 3px solid rgba(32, 168, 98, 0.18);
}

.cs-whatsapp-mark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #20a862;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.cs-privacy-note {
  margin: 11px 0 0;
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.cs-chat-launcher {
  position: fixed;
  z-index: 10002;
  right: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(10, 38, 74, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.cs-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(10, 38, 74, 0.28);
}

.cs-chat-launcher:focus-visible {
  outline: 3px solid #9ccaff;
  outline-offset: 3px;
}

.cs-chat-launcher {
  bottom: 24px;
  width: 60px;
  height: 60px;
  background: var(--cs-blue);
}

.cs-chat-glyph {
  position: relative;
  display: block;
  width: 27px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
}

.cs-chat-glyph::after {
  position: absolute;
  right: 3px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 0 0 2px 0;
  background: #fff;
  content: "";
  transform: skewY(-32deg) rotate(18deg);
}

.cs-chat-glyph i,
.cs-chat-glyph i::after {
  position: absolute;
  top: 9px;
  left: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cs-blue);
  content: "";
}

.cs-chat-glyph i::after {
  top: 0;
  left: 7px;
}

.cs-widget.is-open .cs-chat-launcher {
  visibility: hidden;
  pointer-events: none;
}

.cs-widget.is-open .cs-panel {
  bottom: 24px;
  height: min(520px, calc(100vh - 48px));
}

@media (max-width: 560px) {
  .cs-panel {
    right: 12px;
    bottom: 152px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100vh - 172px));
  }

  .cs-widget.is-open .cs-panel {
    right: 12px;
    bottom: 12px;
    height: min(560px, calc(100vh - 24px));
  }

  .cs-chat-launcher {
    right: 16px;
  }

  .cs-chat-launcher {
    bottom: 18px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .cs-chat-launcher {
    transition: none;
  }
}
