:root {
  --haotechcw-text-color: #0f234c;
  --haotechcw-accent-color: #0f6cf4;
  --haotechcw-field-radius: 12px;
  --haotechcw-button-radius: 999px;
  --haotechcw-button-bg: #0d45f7;
  --haotechcw-button-text: #ffffff;
  --haotechcw-button-bg-hover: #0b39cf;
  --haotechcw-button-text-hover: #ffffff;
  --haotechcw-whatsapp-button-radius: 999px;
  --haotechcw-whatsapp-button-bg: #25d366;
  --haotechcw-whatsapp-button-text: #ffffff;
  --haotechcw-whatsapp-button-bg-hover: #1ebe5d;
  --haotechcw-whatsapp-button-text-hover: #ffffff;
  --haotechcw-modal-backdrop-bg: #0f234c;
  --haotechcw-country-close-color: #e5335f;
  --haotechcw-country-close-color-hover: #b91c3c;
}

.haotechcw-system,
.haotechcw-form,
.haotechcw-modal,
.haotechcw-button,
.haotechcw-floating,
.haotechcw-floating * {
  box-sizing: border-box;
}

.haotechcw-form *,
.haotechcw-modal * {
  box-sizing: border-box;
}

.haotechcw-form {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(15, 35, 76, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 35, 76, 0.08);
  color: var(--haotechcw-text-color);
}

.haotechcw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.haotechcw-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-family: inherit;
  color: var(--haotechcw-text-color);
}

.haotechcw-field span {
  font-size: 14px;
  font-weight: 700;
}

.haotechcw-field b {
  color: var(--haotechcw-accent-color);
}

.haotechcw-field input,
.haotechcw-field select,
.haotechcw-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(15, 35, 76, 0.18) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  padding: 10px 13px !important;
  background: #fff !important;
  color: var(--haotechcw-text-color) !important;
  font: inherit;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.haotechcw-field textarea {
  resize: vertical;
}

.haotechcw-subject-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.haotechcw-subject-row.is-other-selected {
  grid-template-columns: minmax(120px, 0.92fr) minmax(150px, 1fr);
}

.haotechcw-subject-row select[data-haotechcw-subject-select] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.haotechcw-subject-picker {
  position: relative;
  min-width: 0;
}

.haotechcw-form .haotechcw-subject-trigger,
.haotechcw-modal .haotechcw-subject-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 !important;
  border: 1px solid rgba(15, 35, 76, 0.18) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  padding: 10px 14px !important;
  background: #fff !important;
  color: var(--haotechcw-text-color) !important;
  font: inherit !important;
  line-height: 1.2 !important;
  text-align: left !important;
  box-shadow: none !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.haotechcw-subject-trigger:hover,
.haotechcw-subject-trigger:active,
.haotechcw-subject-trigger:focus,
.haotechcw-subject-picker.is-open .haotechcw-subject-trigger {
  border-color: var(--haotechcw-accent-color) !important;
  box-shadow: 0 0 0 3px rgba(15, 108, 244, 0.12) !important;
  outline: none;
}

.haotechcw-subject-trigger.is-placeholder {
  color: rgba(15, 35, 76, 0.5) !important;
}

.haotechcw-subject-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(15, 35, 76, 0.58);
  border-bottom: 2px solid rgba(15, 35, 76, 0.58);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}

.haotechcw-subject-picker.is-open .haotechcw-subject-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.haotechcw-subject-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1001;
  display: grid;
  gap: 4px;
  max-height: 230px;
  overflow: auto;
  padding: 6px !important;
  border: 1px solid rgba(15, 35, 76, 0.12) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 35, 76, 0.16) !important;
}

.haotechcw-modal .haotechcw-subject-panel {
  z-index: 100002;
}

.haotechcw-subject-panel[hidden],
.haotechcw-country-panel[hidden] {
  display: none !important;
}

.haotechcw-subject-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: max(8px, calc(var(--haotechcw-field-radius) - 5px)) !important;
  padding: 9px 12px !important;
  background: transparent !important;
  color: var(--haotechcw-text-color) !important;
  cursor: pointer;
  font: inherit !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.haotechcw-subject-option.is-placeholder {
  color: rgba(15, 35, 76, 0.48) !important;
}

.haotechcw-subject-option:hover {
  background: rgba(15, 108, 244, 0.08) !important;
  color: var(--haotechcw-text-color) !important;
}

.haotechcw-subject-option.is-selected {
  background: rgba(15, 108, 244, 0.12) !important;
  color: var(--haotechcw-text-color) !important;
  font-weight: 650 !important;
}

.haotechcw-field [data-haotechcw-other-subject] {
  margin-top: 0 !important;
}

.haotechcw-field input:focus,
.haotechcw-field select:focus,
.haotechcw-field textarea:focus {
  border-color: var(--haotechcw-accent-color) !important;
  box-shadow: 0 0 0 3px rgba(15, 108, 244, 0.12) !important;
}

.haotechcw-phone-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 8px;
  align-items: start;
}

.haotechcw-country-picker {
  position: relative;
  isolation: isolate;
}

.haotechcw-country-picker.is-open {
  z-index: 100020;
}

.haotechcw-form .haotechcw-country-trigger,
.haotechcw-modal .haotechcw-country-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 !important;
  border: 1px solid rgba(15, 35, 76, 0.18) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  padding: 10px !important;
  background: #fff !important;
  color: var(--haotechcw-text-color) !important;
  font: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transform: none !important;
}

.haotechcw-form .haotechcw-country-trigger:hover,
.haotechcw-modal .haotechcw-country-trigger:hover,
.haotechcw-form .haotechcw-country-trigger:active,
.haotechcw-modal .haotechcw-country-trigger:active {
  background: #fff !important;
  color: var(--haotechcw-text-color) !important;
  border-color: rgba(15, 35, 76, 0.18) !important;
}

.haotechcw-form .haotechcw-country-picker.is-open .haotechcw-country-trigger,
.haotechcw-modal .haotechcw-country-picker.is-open .haotechcw-country-trigger,
.haotechcw-form .haotechcw-country-trigger:focus,
.haotechcw-modal .haotechcw-country-trigger:focus {
  border-color: var(--haotechcw-accent-color) !important;
  box-shadow: 0 0 0 3px rgba(15, 108, 244, 0.12) !important;
  outline: none;
}

.haotechcw-country-current,
.haotechcw-country-option-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.haotechcw-country-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 35, 76, 0.08);
  flex: 0 0 auto;
}

.haotechcw-country-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(15, 35, 76, 0.68);
  border-bottom: 2px solid rgba(15, 35, 76, 0.68);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}

.haotechcw-country-picker.is-open .haotechcw-country-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.haotechcw-country-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 360px;
  max-width: min(360px, 92vw);
  z-index: 100020;
  border: 1px solid rgba(15, 35, 76, 0.12) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  background: #fff !important;
  box-shadow: 0 24px 44px rgba(15, 35, 76, 0.18) !important;
  overflow: hidden;
}

.haotechcw-country-picker.align-right .haotechcw-country-panel {
  right: 0;
  left: auto;
}

.haotechcw-modal .haotechcw-country-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  width: min(380px, calc(100vw - 42px));
  max-width: min(380px, calc(100vw - 42px));
  max-height: min(430px, calc(100vh - 86px));
  z-index: 100010;
  transform: translate(-50%, -50%);
}

.haotechcw-modal .haotechcw-country-picker.align-right .haotechcw-country-panel {
  right: auto;
  left: 50%;
}

.haotechcw-country-search-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(15, 35, 76, 0.08);
  background: #fff !important;
}

.haotechcw-country-close {
  position: static;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--haotechcw-country-close-color) !important;
  border-radius: 999px !important;
  background: var(--haotechcw-country-close-color) !important;
  color: #fff !important;
  cursor: pointer;
  font: inherit !important;
  font-size: 20px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.haotechcw-country-close:hover,
.haotechcw-country-close:focus {
  border-color: var(--haotechcw-country-close-color-hover) !important;
  background: #fff !important;
  color: var(--haotechcw-country-close-color-hover) !important;
  outline: none;
}

.haotechcw-form .haotechcw-country-search,
.haotechcw-modal .haotechcw-country-search {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  margin: 0 !important;
  border: 1px solid rgba(15, 35, 76, 0.18) !important;
  border-radius: var(--haotechcw-field-radius) !important;
  padding: 10px 14px !important;
  background: #fff !important;
  color: var(--haotechcw-text-color) !important;
  font: inherit !important;
  outline: none;
  box-shadow: none !important;
}

.haotechcw-country-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  max-height: 300px;
  overflow: auto;
  padding: 6px !important;
  background: #fff !important;
  columns: initial !important;
}

.haotechcw-modal .haotechcw-country-list {
  max-height: min(312px, calc(100vh - 210px));
}

.haotechcw-form .haotechcw-country-option,
.haotechcw-modal .haotechcw-country-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: calc(var(--haotechcw-field-radius) * 0.65) !important;
  padding: 8px 10px !important;
  background: transparent !important;
  color: var(--haotechcw-text-color) !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transform: none !important;
  outline: none;
}

.haotechcw-form .haotechcw-country-option:nth-child(even),
.haotechcw-modal .haotechcw-country-option:nth-child(even) {
  background: rgba(15, 35, 76, 0.025) !important;
}

.haotechcw-form .haotechcw-country-option:hover,
.haotechcw-modal .haotechcw-country-option:hover {
  background: rgba(15, 108, 244, 0.07) !important;
}

.haotechcw-form .haotechcw-country-option.is-selected,
.haotechcw-modal .haotechcw-country-option.is-selected {
  background: rgba(15, 108, 244, 0.11) !important;
}

.haotechcw-country-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.haotechcw-country-option-side {
  flex: 0 0 auto;
  font-weight: 700;
  color: rgba(15, 35, 76, 0.78);
}

.haotechcw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px !important;
  border: 0 !important;
  cursor: pointer;
  font: inherit;
  font-weight: 650 !important;
  text-decoration: none !important;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.haotechcw-button:hover {
  transform: translateY(-1px);
}

.haotechcw-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.haotechcw-button-primary {
  width: 100%;
  border-radius: var(--haotechcw-button-radius) !important;
  background: var(--haotechcw-button-bg) !important;
  color: var(--haotechcw-button-text) !important;
  box-shadow: none !important;
}

.haotechcw-button-primary:hover,
.haotechcw-button-primary:focus,
.haotechcw-button-primary:active {
  background: var(--haotechcw-button-bg-hover) !important;
  color: var(--haotechcw-button-text-hover) !important;
}

.haotechcw-button-whatsapp {
  width: 100%;
  border-radius: var(--haotechcw-whatsapp-button-radius) !important;
  background: var(--haotechcw-whatsapp-button-bg) !important;
  color: var(--haotechcw-whatsapp-button-text) !important;
  box-shadow: none !important;
}

.haotechcw-button-whatsapp:hover,
.haotechcw-button-whatsapp:focus,
.haotechcw-button-whatsapp:active {
  background: var(--haotechcw-whatsapp-button-bg-hover) !important;
  color: var(--haotechcw-whatsapp-button-text-hover) !important;
}

.haotechcw-button-subject {
  --haotechcw-subject-button-bg: var(--haotechcw-whatsapp-button-bg);
  --haotechcw-subject-button-text: var(--haotechcw-whatsapp-button-text);
  --haotechcw-subject-button-bg-hover: var(--haotechcw-whatsapp-button-bg-hover);
  --haotechcw-subject-button-text-hover: var(--haotechcw-whatsapp-button-text-hover);
  --haotechcw-subject-button-radius: var(--haotechcw-whatsapp-button-radius);
  border-radius: var(--haotechcw-subject-button-radius) !important;
  background: var(--haotechcw-subject-button-bg) !important;
  color: var(--haotechcw-subject-button-text) !important;
}

.haotechcw-button-subject:hover,
.haotechcw-button-subject:focus,
.haotechcw-button-subject:active {
  background: var(--haotechcw-subject-button-bg-hover) !important;
  color: var(--haotechcw-subject-button-text-hover) !important;
}

.haotechcw-success {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 14px;
  background: rgba(37, 211, 102, 0.09);
  color: #116c35;
}

.haotechcw-success[hidden] {
  display: none;
}

.haotechcw-error {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.haotechcw-error[hidden] {
  display: none;
}

.haotechcw-floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row !important;
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--haotechcw-whatsapp-button-radius) !important;
  background: var(--haotechcw-whatsapp-button-bg) !important;
  color: var(--haotechcw-whatsapp-button-text) !important;
  box-shadow: none !important;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.18s ease, color 0.18s ease;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.haotechcw-floating.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.haotechcw-floating:hover {
  transform: scale(1.06);
  background: var(--haotechcw-whatsapp-button-bg-hover) !important;
  color: var(--haotechcw-whatsapp-button-text-hover) !important;
}

.haotechcw-floating-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  margin: 0;
  line-height: 0;
}

.haotechcw-floating-icon svg {
  display: block;
  width: 36px;
  height: 36px;
  fill: currentColor;
  transform: translate(6px, -2px);
}

.haotechcw-floating-icon-mode {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  padding: 0 !important;
}

.haotechcw-floating-icon-mode .haotechcw-floating-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  transform: translate(2px, 0);
}

.haotechcw-floating-icon-mode .haotechcw-floating-icon svg {
  width: 42px;
  height: 42px;
  transform: translate(5px, -1px);
}

.haotechcw-floating-label {
  position: relative;
  z-index: 1;
  display: none;
  max-width: none;
  overflow: hidden;
  color: inherit;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.haotechcw-floating-label-mode {
  width: auto;
  min-width: 0;
  height: 56px;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 16px !important;
}

.haotechcw-floating-label-mode .haotechcw-floating-label {
  display: block !important;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  margin: 0;
  text-align: left;
  white-space: nowrap !important;
}

.haotechcw-floating-label-mode .haotechcw-floating-icon {
  width: 34px;
  height: 34px;
}

.haotechcw-floating-label-mode .haotechcw-floating-icon svg {
  width: 31px;
  height: 31px;
  transform: translate(2px, -1px);
}

.haotechcw-floating-pulse {
  position: absolute;
  inset: 3px;
  z-index: 0;
  border-radius: inherit;
  background: var(--haotechcw-whatsapp-button-bg) !important;
  opacity: 0.18;
  animation: haotechcw-pulse 1.8s infinite;
}

@keyframes haotechcw-pulse {
  0% { transform: scale(1); opacity: 0.28; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

.haotechcw-modal[hidden] {
  display: none;
}

.haotechcw-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.haotechcw-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 76, 0.58);
  background: color-mix(in srgb, var(--haotechcw-modal-backdrop-bg) 58%, transparent);
  backdrop-filter: blur(4px);
}

.haotechcw-modal-panel {
  position: relative;
  width: min(100%, 470px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 35, 76, 0.24);
  color: var(--haotechcw-text-color);
}

.haotechcw-contact-modal .haotechcw-modal-panel {
  width: min(100%, 820px);
}

.haotechcw-contact-modal .haotechcw-form {
  max-width: none;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.haotechcw-modal-panel h3 {
  margin: 0 34px 8px 0;
  color: var(--haotechcw-text-color);
  font-size: 24px;
  line-height: 1.2;
}

.haotechcw-modal-description {
  margin: 0 0 18px;
  color: rgba(15, 35, 76, 0.72);
}

.haotechcw-modal-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.haotechcw-modal-error[hidden] {
  display: none !important;
}

.haotechcw-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 35, 76, 0.06);
  color: var(--haotechcw-text-color);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 680px) {
  .haotechcw-form {
    padding: 22px;
  }

  .haotechcw-subject-row.is-other-selected {
    grid-template-columns: 1fr;
  }

  .haotechcw-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .haotechcw-phone-row {
    grid-template-columns: 1fr;
  }

  .haotechcw-country-panel {
    width: 100%;
    max-width: 100%;
  }

  .haotechcw-modal .haotechcw-button,
  .haotechcw-contact-modal .haotechcw-button,
  .haotechcw-form .haotechcw-button-primary,
  .haotechcw-button-subject {
    display: flex !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
  }

  .haotechcw-floating {
    right: 18px;
    bottom: 18px;
  }
}
