.ssw-widget {
  --ssw-navy: #001f30;
  --ssw-red: #ed1c24;
  --ssw-green: #25d366;
  --ssw-dark-green: #128c7e;
  position: fixed;
  z-index: 9999999 !important;
  right: 24px;
  bottom: 24px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ssw-launcher {
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.42), 0 4px 12px rgba(0, 31, 48, 0.18);
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
  position: relative;
  z-index: 2;
}

.ssw-launcher:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.55), 0 6px 16px rgba(0, 31, 48, 0.22);
}

.ssw-launcher svg {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 0;
  fill: #ffffff;
  background: transparent;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.ssw-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  z-index: 10;
  width: min(380px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(0, 31, 48, 0.08);
  border-radius: 20px;
  visibility: hidden;
  opacity: 0;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(0, 31, 48, 0.22), 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.26s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s;
}

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

.ssw-panel header {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #001f30 0%, #082d42 100%);
  position: relative;
}

.ssw-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.ssw-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.ssw-presence {
  display: flex;
  flex-direction: column;
}

.ssw-presence strong {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.ssw-presence span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  margin-top: 3px;
}

.ssw-presence i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
}

.ssw-panel header button {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: none;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ssw-panel header button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ssw-body {
  padding: 18px;
}

.ssw-message {
  max-width: 90%;
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  color: #1e293b;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 31, 48, 0.06);
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #e2e8f0;
}

.ssw-form {
  margin-top: 16px;
}

.ssw-step {
  display: none;
}

.ssw-step.is-active {
  display: grid;
  gap: 12px;
  animation: sswSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ssw-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.ssw-form input,
.ssw-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ssw-form textarea {
  resize: vertical;
}

.ssw-form input:focus,
.ssw-form textarea:focus {
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.ssw-primary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 20px;
  border: none;
  border-radius: 999px;
  color: #ffffff;
  background: #001f30;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-top: 4px;
}

.ssw-primary:hover {
  background: #082d42;
}

.ssw-primary .ssw-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #001f30;
  background: #ffffff;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.ssw-primary.ssw-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.ssw-primary.ssw-whatsapp:hover {
  filter: brightness(1.05);
}

.ssw-primary.ssw-whatsapp .ssw-arrow {
  color: #128c7e;
}

.ssw-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ssw-status {
  min-height: 16px;
  margin: 8px 2px 0;
  color: #ed1c24;
  font-size: 12px;
  font-weight: 600;
}

.ssw-trap {
  position: absolute !important;
  left: -9999px !important;
}

.ssw-panel > footer {
  padding: 10px 18px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  background: #ffffff;
  font-size: 11px;
  text-align: center;
}

@keyframes sswSlideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  .ssw-widget {
    right: 16px;
    bottom: 16px;
  }
  .ssw-launcher {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 8px;
    justify-content: center;
  }
  .ssw-launcher > span {
    display: none;
  }
  .ssw-launcher svg {
    width: 36px;
    height: 36px;
  }
  .ssw-panel {
    position: fixed;
    right: 16px;
    bottom: 80px;
    left: 16px;
    width: auto;
  }
  .ssw-body {
    padding: 16px;
  }
}
