.cew-contact-form {
  width: 100%;
}

.cew-contact-form__inner {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.cew-contact-form__progress {
  margin-bottom: 1.25rem;
}

.cew-contact-form__progress-text {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.cew-contact-form__progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.cew-contact-form__progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #111;
  transition: width 0.25s ease;
}

.cew-contact-form__form {
  margin: 0;
}

.cew-contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cew-contact-form__field {
  margin-bottom: 1rem;
}

.cew-contact-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.cew-contact-form__req {
  color: #c00;
}

.cew-contact-form__field input.cew-contact-form__input,
.cew-contact-form__field textarea.cew-contact-form__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  line-height: 1.4;
}

/* Custom dropdown: hidden native <select> + trigger + listbox (matches styled select UI). */
.cew-contact-form__select-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  color: inherit;
}

.cew-contact-form__select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cew-contact-form__select-ui {
  position: relative;
  width: 100%;
}

.cew-contact-form__select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #f0f2f5;
  color: #111;
  font: inherit;
  line-height: 1.4;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.cew-contact-form__select-trigger:hover {
  background: #e8eaef;
}

.cew-contact-form__select-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.cew-contact-form__select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cew-contact-form__select-chevron {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.45;
  background-color: currentColor;
  transition: transform 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 15.2 6.4 9.6h11.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 15.2 6.4 9.6h11.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cew-contact-form__select-wrap--open .cew-contact-form__select-chevron {
  transform: rotate(180deg);
}

.cew-contact-form__select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  box-sizing: border-box;
  border-radius: 0 0 10px 10px;
  background: #f0f2f5;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
  max-height: min(320px, 55vh);
  overflow-y: auto;
}

.cew-contact-form__select-wrap--open .cew-contact-form__select-trigger {
  border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.cew-contact-form__select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  color: #111;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.cew-contact-form__select-option:hover:not(.is-selected) {
  background: rgba(255, 255, 255, 0.65);
}

.cew-contact-form__select-option.is-selected {
  background: #2563eb;
  color: #fff;
}

.cew-contact-form__select-option-label {
  flex: 1;
  min-width: 0;
  text-align: start;
}

.cew-contact-form__select-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  opacity: 0;
}

.cew-contact-form__select-option.is-selected .cew-contact-form__select-check {
  opacity: 1;
}

.cew-contact-form__select-check-icon {
  display: block;
}

.cew-contact-form__select-list[hidden] {
  display: none !important;
}

.cew-contact-form__select-wrap--error .cew-contact-form__select-trigger {
  border-color: #c00;
  box-shadow: 0 0 0 1px rgba(204, 0, 0, 0.2);
}

.cew-contact-form__field textarea.cew-contact-form__input {
  resize: vertical;
  min-height: 120px;
}

.cew-contact-form__input--error {
  border-color: #c00 !important;
  box-shadow: 0 0 0 1px rgba(204, 0, 0, 0.15);
}

.cew-contact-form__select-native.cew-contact-form__input--error {
  box-shadow: none !important;
}

.cew-contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cew-contact-form__cta-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  position: relative;
}

/* .cta-btn { display: inline-flex } from CTA styles wins over the [hidden] attribute in the cascade, so buttons stayed visible. */
.cew-contact-form button.cew-contact-form__cta[hidden] {
  display: none !important;
}

.cew-contact-form__actions-spacer {
  flex: 1 1 auto;
  min-width: 0.5rem;
}

.cew-contact-form__cta:disabled,
.cew-contact-form__cta[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.cew-contact-form__checkboxes {
  border: 0;
  padding: 0;
  margin: 0 0 0.25rem;
  min-width: 0;
}

.cew-contact-form__checkboxes .cew-contact-form__label {
  margin-bottom: 0.5rem;
}

.cew-contact-form__check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.4rem 0;
  cursor: pointer;
  font-weight: 400;
}

.cew-contact-form__check-row input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.cew-contact-form__check-text {
  line-height: 1.4;
}

.cew-contact-form__fieldset--error {
  padding: 0.5rem;
  border-radius: 6px;
  outline: 2px solid rgba(204, 0, 0, 0.45);
  outline-offset: 2px;
}

.cew-contact-form__message {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.cew-contact-form__message--success {
  color: #0a7a2f;
}

.cew-contact-form__message--error {
  color: #a40000;
}

.cew-contact-form--error {
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}
