.communication-preferences_wrapper {
  --form-bg-color: #f5f5f5;
  --form-color-label: #00438b;
  --form-color-text: #1f2937;
  --form-color-text-muted: #555;
  --form-color-border: #aaa;
  --form-color-border-strong: #6b7280;
  --form-color-surface: #fff;
  --form-color-link: #005de6;
  --form-color-focus: #005de6;
  --form-color-button-bg: #005de6;
  --form-color-button-text: #fff;
  --form-color-button-bg-hover: #004cbb;
  --form-shadow-focus: 0 0 0 3px rgb(0 93 230 / 20%);
  --form-radius-field: 0.5rem;
  --form-radius-button: 999px;
  --form-space-1: 0.25rem;
  --form-space-2: 0.5rem;
  --form-space-3: 0.75rem;
  --form-space-4: 1rem;
  --form-space-5: 1.5rem;
  --form-space-6: 2rem;
  --form-font-size-body: 1rem;
  --form-font-size-small: 0.9rem;
  --form-font-size-meta: 0.8rem;
  --form-line-height-body: 1.5;
  --form-line-height-tight: 1.3;
  --form-touch-target-min: 2.75rem;
  --form-switch-width: 2.75rem;
  --form-switch-height: 1.5rem;
  --form-switch-thumb-size: 1.125rem;
  --form-switch-track-off: #cbd5e1;
  --form-switch-track-on: #005de6;
  --form-switch-thumb: #fff;
}

.communication-preferences_wrapper .gform-body,
.communication-preferences_wrapper .gform_footer {
  color: var(--form-color-text);
}

.communication-preferences_wrapper .gform_footer,
.communication-preferences_wrapper .gform_page_footer {
  padding: 0 !important;
  margin: 0 !important;
}

.communication-preferences_wrapper .gform_fields {
  grid-row-gap: 0 !important;
  background-color: var(--form-bg-color);
}

.communication-preferences_wrapper .gfield {
  margin-bottom: 1em;
}

.communication-preferences_wrapper .form-spacer {
  border: none !important;
  margin-bottom: 0;
}

.communication-preferences_wrapper p a {
  font-weight: bold;
  text-decoration: underline;
}

.communication-preferences_wrapper fieldset {
  line-height: var(--form-line-height-tight);
  padding: 0.75em !important;
}

.communication-preferences_wrapper .gfield_label,
.communication-preferences_wrapper .gform-field-label {
  color: var(--form-color-label);
  font-size: var(--form-font-size-body) !important;
  margin-bottom: 0 !important;
}

.communication-preferences_wrapper input[type="text"],
.communication-preferences_wrapper input[type="email"],
.communication-preferences_wrapper input[type="tel"],
.communication-preferences_wrapper select,
.communication-preferences_wrapper textarea {
  width: 100%;
  max-width: none;
  min-height: var(--form-touch-target-min);
  padding: 0.8em 0.95em !important;
  border: 1px solid var(--form-color-border);
  border-radius: var(--form-radius-field);
  background: var(--form-color-surface);
  color: var(--form-color-text);
  font-size: var(--form-font-size-body) !important;
  line-height: var(--form-line-height-body);
}

.communication-preferences_wrapper input.small,
.communication-preferences_wrapper input.medium,
.communication-preferences_wrapper input.large,
.communication-preferences_wrapper select.small,
.communication-preferences_wrapper select.medium,
.communication-preferences_wrapper select.large,
.communication-preferences_wrapper textarea.small,
.communication-preferences_wrapper textarea.medium,
.communication-preferences_wrapper textarea.large {
  width: 100% !important;
  max-width: none;
}

.communication-preferences_wrapper input::placeholder,
.communication-preferences_wrapper textarea::placeholder {
  color: color-mix(in srgb, var(--form-color-text-muted) 78%, white);
}

.communication-preferences_wrapper input:focus-visible,
.communication-preferences_wrapper select:focus-visible,
.communication-preferences_wrapper textarea:focus-visible,
.communication-preferences_wrapper .gform-button:focus-visible,
.communication-preferences_wrapper a:focus-visible,
.communication-preferences_wrapper .iti__selected-country:focus-visible {
  outline: 2px solid var(--form-color-focus);
  outline-offset: 2px;
  box-shadow: var(--form-shadow-focus);
}

.communication-preferences_wrapper
  .gfield_checkbox
  [aria-invalid="true"]
  + label {
  color: var(--form-color-label) !important;
}

.communication-preferences_wrapper input[aria-invalid="true"],
.communication-preferences_wrapper select[aria-invalid="true"],
.communication-preferences_wrapper textarea[aria-invalid="true"] {
  border-color: var(--form-color-border-strong);
}

.communication-preferences_wrapper input:disabled,
.communication-preferences_wrapper select:disabled,
.communication-preferences_wrapper textarea:disabled {
  cursor: not-allowed;
  background-color: #ddd !important;
}

.communication-preferences_wrapper .gfield--type-phone .ginput_container,
.communication-preferences_wrapper .gfield--type-phone .ginput_container_phone,
.communication-preferences_wrapper .iti,
.communication-preferences_wrapper .iti__tel-input {
  width: 100%;
}

.communication-preferences_wrapper .iti .iti__tel-input {
  padding-right: 0.95em !important;
  padding-left: 5.25rem !important;
}

.communication-preferences_wrapper .iti__selected-country {
  min-height: var(--form-touch-target-min);
}

.communication-preferences_wrapper .gfield--type-checkbox > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.communication-preferences_wrapper .gfield_checkbox {
  display: flex;
  flex-direction: column;
  gap: var(--form-space-2);
}

.communication-preferences_wrapper .gchoice {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.communication-preferences_wrapper .gfield-choice-input {
  position: absolute;
  inset-block-start: 0.1rem;
  inset-inline-start: 0;
  inline-size: var(--form-switch-width);
  block-size: var(--form-switch-height);
  margin: 0;
  opacity: 0.001;
}

.communication-preferences_wrapper .gchoice label {
  position: relative;
  display: inline-block;
  min-block-size: var(--form-switch-height);
  margin-bottom: 0;
  padding: 0 0 0 calc(var(--form-switch-width) + var(--form-space-3));
  font-size: var(--form-font-size-body);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.communication-preferences_wrapper .gfield-choice-input + label::before {
  content: "";
  position: absolute;
  inset-block-start: 0.05rem;
  inset-inline-start: 0;
  inline-size: var(--form-switch-width);
  block-size: var(--form-switch-height);
  border-radius: 999px;
  background: var(--form-switch-track-off);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.communication-preferences_wrapper .gfield-choice-input + label::after {
  content: "";
  position: absolute;
  inset-block-start: calc(
    0.05rem + (var(--form-switch-height) - var(--form-switch-thumb-size)) / 2
  );
  inset-inline-start: calc(
    (var(--form-switch-height) - var(--form-switch-thumb-size)) / 2
  );
  inline-size: var(--form-switch-thumb-size);
  block-size: var(--form-switch-thumb-size);
  border-radius: 50%;
  background: var(--form-switch-thumb);
  box-shadow: 0 1px 3px rgb(15 23 42 / 25%);
  transition: transform 0.15s ease;
}

.communication-preferences_wrapper
  .gfield-choice-input:checked
  + label::before {
  background: var(--form-switch-track-on);
}

.communication-preferences_wrapper .gfield-choice-input:checked + label::after {
  transform: translateX(
    calc(var(--form-switch-width) - var(--form-switch-thumb-size) - 0.375rem)
  );
}

.communication-preferences_wrapper
  .gfield-choice-input:focus-visible
  + label::before {
  outline: 2px solid var(--form-color-focus);
  outline-offset: 2px;
  box-shadow: var(--form-shadow-focus);
}

.communication-preferences_wrapper .gfield-choice-input:disabled + label {
  cursor: not-allowed;
  opacity: 0.7;
}

.communication-preferences_wrapper .gfield_description {
  width: auto !important;
  margin-left: calc(var(--form-switch-width) + var(--form-space-3));
  padding-top: 0 !important;
  color: var(--form-color-text-muted);
  font-size: var(--form-font-size-small) !important;
  line-height: var(--form-line-height-tight) !important;
  text-wrap: balance;
}

.communication-preferences_wrapper .gfield--type-email .gfield_description,
.communication-preferences_wrapper .gfield--type-phone .gfield_description {
  margin-left: 0;
}

.communication-preferences_wrapper .gfield_description ul {
  margin: var(--form-space-2) 0 0 1.25rem;
}

.communication-preferences_wrapper .gfield_description a {
  color: var(--form-color-link);
  font-weight: 700;
  text-underline-offset: 0.12em;
}

.communication-preferences_wrapper .gfield_description a[data-panel] {
  display: inline-flex;
  align-items: center;
  gap: var(--form-space-2);
}

.communication-preferences_wrapper .gfield_description a[data-panel]::before {
  content: "";
  inline-size: 0;
  block-size: 0;
  border-top: 0.32rem solid transparent;
  border-bottom: 0.32rem solid transparent;
  border-left: 0.44rem solid currentColor;
  transform: rotate(0deg);
  transform-origin: 35% 50%;
  transition: transform 0.15s ease;
}

.communication-preferences_wrapper .gfield_description > [data-panel] ~ div {
  margin-top: 0.5em;
}

.communication-preferences_wrapper .gfield_description > [data-panel] ~ div li {
  line-height: var(--form-line-height-tight);
}

.communication-preferences_wrapper
  .gfield_description
  a[data-panel][aria-expanded="true"]::before,
.communication-preferences_wrapper
  .gfield_description
  a[data-panel].is-open::before {
  transform: rotate(90deg);
}

.communication-preferences_wrapper .gfield--type-section {
  padding: 0 !important;
}

.communication-preferences_wrapper .gfield--type-section .gsection_title {
  margin: var(--form-space-4) 0 0;
  color: var(--form-color-label);
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.2;
}

.communication-preferences_wrapper .legal-box,
.communication-preferences_wrapper .preferences-notice {
  font-size: var(--form-font-size-meta);
  line-height: var(--form-line-height-tight);
}

.communication-preferences_wrapper .preferences-notice {
  order: 1;
  max-width: 55ch;
  text-wrap: balance;
}

.communication-preferences_wrapper .legal-box p,
.communication-preferences_wrapper .preferences-notice p {
  margin-block: 0 0.85em;
}

.communication-preferences_wrapper .gform-button {
  appearance: none;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--form-radius-button);
  background: var(--form-color-button-bg);
  color: var(--form-color-button-text);
  font-size: clamp(1.2rem, 3svw, 1.5rem);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    filter 0.15s ease;
}

.communication-preferences_wrapper .gform-button:hover {
  background: var(--form-color-button-bg-hover);
}

.communication-preferences_wrapper .gform-button:active {
  transform: translateY(1px);
}

.communication-preferences_wrapper .gfield-choice-input:disabled,
.communication-preferences_wrapper .gform-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.communication-preferences_wrapper .gform_validation_errors > h2.hide_summary {
  padding-left: 2.5rem !important;
}

@media (max-width: 639.98px) {
  .communication-preferences_wrapper .gf_left_half,
  .communication-preferences_wrapper .gf_right_half {
    width: 100% !important;
    margin-right: 0 !important;
  }

  .communication-preferences_wrapper .gchoice {
    gap: var(--form-space-2);
  }

  .communication-preferences_wrapper .gform-button {
    width: 100%;
  }
}
