/**
 * WorkDigital Contact Form - Clean Modern Stylesheet
 * Theme-integrated styling with contemporary design patterns
 */

/* ==== CSS CUSTOM PROPERTIES ==== */
:root {
  --wd-form-radius: 3px;
  --wd-form-transition: all 0.2s ease;
  --wd-form-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --wd-form-shadow-focus: 0 0 0 3px
    rgba(var(--primary-color-rgb, 0, 115, 230), 0.15);
  --wd-error-color: #dc3545;
  --wd-success-color: #28a745;
  --wd-spacing-xs: 8px;
  --wd-spacing-sm: 12px;
  --wd-spacing-md: 20px;
  --wd-spacing-lg: 32px;
}

/* ==== MAIN FORM CONTAINER ==== */
.wd-contact-form {
  max-width: unset;
  margin: 0 auto;
  padding: 0;
  font-size: var(--body-font-size), 16px;
}

.wd-contact-form .wd-contact-form-inner {
  background: var(--background-color, #fff);
  border-radius: var(--wd-form-radius);
  padding: var(--wd-spacing-lg);
  box-shadow: var(--wd-form-shadow);
  position: relative;
  overflow: hidden;
}

.wd-contact-form .wd-form-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--text-color, #1a1a1a);
  margin: 0 0 var(--wd-spacing-lg);
  text-align: center;
  line-height: 1.2;
}

.wd-contact-form .wd-form-fields {
  display: grid;
  gap: var(--wd-spacing-md);
}

.wd-contact-form .kontaktform-form-row {
  container-name: kontakt-form-grid;
  container-type: inline-size;
  position: relative;
  padding: 0;
  color: var(--text-color, #1a1a1a);
  background-color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.wd-contact-form .kontaktform-rows {
  grid-template-columns: 1fr 1fr;
  display: grid;
}

@container kontakt-form-grid (width < 435px) {
  .wd-contact-form .kontaktform-rows {
    grid-template-columns: 1fr;
  }
}

/* ==== FORM GROUPS ==== */
.wd-contact-form .form-group {
  position: relative;
}

/* ==== INPUT WRAPPER & ICONS ==== */
.wd-contact-form .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.wd-contact-form .input-wrapper .wd-field-input {
  flex-grow: 1;
  /* Make space for icon */
}

.wd-contact-form .wd-field-icon,
.wd-contact-form .wd-field-icon .wd-icon,
.wd-contact-form .wd-field-icon svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

.wd-contact-form .input-wrapper > .wd-field-icon {
  position: absolute;
  inset-inline-start: 12px;
  pointer-events: none;
  line-height: 0;
}

.wd-contact-form .input-wrapper:has(textarea) > .wd-field-icon {
  top: 14px;
}

.wd-contact-form .has-field-icon .wd-field-input {
  padding-inline-start: 44px;
}

.wd-contact-form .wd-submit-text:has(.wd-field-icon) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wd-contact-form .input-wrapper > .wd-icon-right {
  inset-inline-start: auto;
  inset-inline-end: 12px;
}

.wd-contact-form .input-wrapper:has(> .wd-icon-right) .wd-field-input {
  padding-inline-start: 10px;
  padding-inline-end: 44px;
}

.wd-contact-form
  .has-error
  .input-wrapper:has(> .wd-icon-right)
  .wd-field-input {
  padding-inline-end: 72px;
}

.wd-contact-form .input-wrapper:has(> .wd-icon-right) .error-icon {
  right: 44px;
}

.wd-contact-form .input-wrapper:has(> .wd-icon-right) .wd-date-placeholder {
  right: 44px;
}

.wd-contact-form .wd-submit-text > .wd-icon-right {
  order: 1;
}

.wd-contact-form .wd-date-placeholder {
  display: none;
  position: absolute;
  left: 10px;
  right: 40px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  color: var(--text-color-light, #6b7280);
}

.wd-contact-form .has-field-icon:not(:has(> .wd-icon-right)) .wd-date-placeholder {
  left: 44px;
}

.wd-contact-form .wd-date-empty:not(:focus) {
  color: transparent;
}

.wd-contact-form .wd-date-empty:not(:focus)::-webkit-datetime-edit {
  color: transparent;
}

.wd-contact-form .wd-date-empty:not(:focus) + .wd-date-placeholder {
  display: block;
}

.wd-contact-form .error-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wd-error-color, #dc3545);
  pointer-events: none; /* So it doesn't block clicks on input */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Error icon visibility control */
.wd-contact-form .error-icon.hidden {
  display: none;
}

.wd-contact-form .error-icon.visible {
  display: flex;
}

/* Special positioning for textarea error icons */
.wd-contact-form .input-wrapper:has(textarea) .error-icon {
  top: 16px;
  transform: none;
}

/* Error icon positioning for checkbox fields */
.wd-contact-form .checkbox-wrapper {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
}

.wd-contact-form .checkbox-wrapper .error-icon {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wd-error-color, #dc3545);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-contact-form .checkbox-wrapper .error-icon.hidden {
  display: none;
}

.wd-contact-form .checkbox-wrapper .error-icon.visible {
  display: flex;
}

/* Error icon positioning for radio fields */
.wd-contact-form .radio-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wd-contact-form .radio-group .error-icon {
  position: absolute;
  right: 0;
  top: 0;
  color: var(--wd-error-color, #dc3545);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-contact-form .radio-group .error-icon.hidden {
  display: none;
}

.wd-contact-form .radio-group .error-icon.visible {
  display: flex;
}

/* Error icon positioning for file upload fields */
.wd-contact-form .file-upload-wrapper .error-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--wd-error-color, #dc3545);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-contact-form .file-upload-wrapper .error-icon.hidden {
  display: none;
}

.wd-contact-form .file-upload-wrapper .error-icon.visible {
  display: flex;
}

/* ==== VALIDATION STATES ==== */
.wd-contact-form .form-group.has-error .wd-field-input,
.wd-contact-form .form-group.has-error .wd-field-input:focus {
  border-color: var(--wd-error-color, #dc3545);
  box-shadow: none;
}

.wd-contact-form .form-group.has-error select {
  background-position: center right 40px;
}

.wd-contact-form .form-group.has-error .file-upload-wrapper {
  border-color: var(--wd-error-color, #dc3545);
}

/* ==== INPUT STYLING ==== */
.wd-contact-form
  :is(
    .wd-field-input,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select
  ) {
  width: 100%;
  border: 1px solid var(--separator, #e1e5e9);
  border-radius: var(--wd-form-radius);
  background: var(--background-color, #fff);
  color: var(--text-color, #1a1a1a);
  font-size: var(--body-font-size), 16px;
  font-family: inherit;
  line-height: 1.5;
  transition: var(--wd-form-transition);
  box-sizing: border-box;
  appearance: none;
  padding: 10px 40px 10px 10px;
  display: block;
}

.wd-contact-form input:is([type="date"], [type="time"], [type="datetime-local"]) {
  -webkit-appearance: none;
  appearance: none;
  padding: 10px;
}

.wd-contact-form input:is([type="date"], [type="time"], [type="datetime-local"])::-webkit-calendar-picker-indicator {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.wd-contact-form
  :is(
    .wd-field-input:not(.wd-submit-btn),
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    textarea,
    select
  ):active {
  background-color: var(--separator, #e1e5e9);
}

.wd-contact-form :is(.wd-field-input, input, textarea, select):focus {
  outline: none;
  border-color: var(--primary-color, #0073e6);
  /*box-shadow: var(--wd-form-shadow-focus);*/
}

.wd-contact-form :is(.wd-field-input, input, textarea)::placeholder {
  /*color: var(--text-color-light, #6b7280);*/
  opacity: 0;
}

.wd-contact-form :is(.wd-field-input, input, textarea):focus::placeholder {
  /*color: var(--text-color-light, #6b7280);*/
  opacity: 1;
}

.wd-contact-form :is(.kontaktform-form-row, .kontaktform-rows) {
  gap: 20px 15px;
}

.wd-contact-form label {
  position: relative;
}

.wd-contact-form label * {
  line-height: normal;
}

.wd-contact-form label:has(.input-wrapper > .wd-field-icon:not(.wd-icon-right)) {
  --wd-label-left: 44px;
}

.wd-contact-form label span.label-text {
  position: absolute;
  z-index: 1;
  left: var(--wd-label-left, 10px);
  right: auto;
  top: 12px;
  bottom: auto;
  padding: 2px 5px;
  transition: all 0.2s ease;
  color: var(--text-color, #1a1a1a);
  font-size: var(--body-font-size), 16px;
}

.wd-contact-form label:has(:is(.wd-field-input, input, textarea, select):focus)
  span.label-text,
.wd-contact-form label:has(
    :is(.wd-field-input, input, textarea, select):not(:placeholder-shown):not(
        .wd-date-empty
      )
  )
  span.label-text {
  left: 10px;
  font-size: 13px;
  line-height: normal;
  top: -12px;
  background: var(--background-color, #fff);
  border-radius: var(--wd-form-radius);
}
/* A floating label supplies the empty date field's prompt; avoid showing it twice. */
.wd-contact-form label:has(.label-text):has(.wd-date-empty) .wd-date-placeholder {
  display: none;
}

.wd-contact-form label:has(.form-group.wd-field-conditionally-hidden) {
  display: none;
}

/* ==== TEXTAREA ==== */
.wd-contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* ==== SELECT DROPDOWN ==== */
.wd-contact-form select.wd-field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
  cursor: pointer;
}

/* Select placeholder styling */
.wd-contact-form .select-placeholder-option {
  color: var(--text-color-light, #6b7280);
  font-style: italic;
}

/* When placeholder is selected, style the select element */
.wd-contact-form select.wd-field-input:invalid {
  color: var(--text-color-light, #6b7280);
  font-style: italic;
}

/* ==== CHECKBOX & RADIO ==== */
/* Base styles for both checkbox and radio */
.wd-contact-form :is(input[type="checkbox"], input[type="radio"]) {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid var(--separator, #e1e5e9);
  position: relative;
  cursor: pointer;
  transition: var(--wd-form-transition);
  aspect-ratio: 1 / 1;
  top: 3px;
  align-self: flex-start;
}

.wd-contact-form input[type="checkbox"] {
  max-width: 22px;
  width: 22px;
  padding: 0;
  height: 22px;
}

.wd-contact-form .form-group:has(.checkbox-wrapper) {
  align-self: stretch;
}

.wd-contact-form .gdpr-text {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wd-contact-form .gdpr-text .wd-error-message {
  position: absolute;
  width: max-content;
}

.wd-contact-form label:has(.gdpr-text .wd-error-message) {
  margin-bottom: 16px;
}

.wd-contact-form label:has(.form-group .radio-group) {
  background-color: var(--surface-color-faded, #efefef);
  padding: 12px;
  border-radius: var(--wd-form-radius);
}

.wd-contact-form label:has(.form-group .radio-group) span.label-text {
  position: relative;
  top: 0;
  background-color: transparent;
  padding: 0;
  left: 0;
  margin-bottom: 10px;
  display: block;
}

.wd-contact-form option:not(.select-placeholder-option) {
  color: var(--text-color, #333);
  font-style: normal;
}

/* Checkbox-specific: square shape */
.wd-contact-form input[type="checkbox"] {
  border-radius: 4px;
}

/* Checkbox: checked state */
.wd-contact-form input[type="checkbox"]:checked {
  background-color: var(--primary-color, #0073e6);
  border-color: var(--primary-color, #0073e6);
}

/* Checkbox: checkmark (visible only when checked) */
.wd-contact-form input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 35%;
  left: 50%;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Radio-specific: circular shape */
.wd-contact-form input[type="radio"] {
  border-radius: 50%;
  padding: 0;
}

/* Radio: checked state */
.wd-contact-form .radio-option {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wd-contact-form .radio-option label {
  line-height: normal;
  width: 100%;
  cursor: pointer;
  text-wrap: balance;
}

/* Radio: selected dot (visible only when checked) */
.wd-contact-form input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color, #0073e6);
  transform: translate(-50%, -50%);
}

body.dark-mode .wd-contact-form input[type="radio"]:checked::after {
  background-color: var(--text-color, #0073e6);
}

/* Radio placeholder styling */
.wd-contact-form .radio-placeholder {
  opacity: 0.7;
}

.wd-contact-form .radio-placeholder-input {
  cursor: pointer;
  opacity: 0.8;
}

.wd-contact-form .radio-placeholder-label {
  cursor: pointer;
  color: var(--text-color-light, #6b7280);
  font-style: italic;
}

.wd-contact-form .radio-option.radio-placeholder {
  display: none;
}

/* When placeholder is selected, keep it visually distinct */
.wd-contact-form .radio-placeholder-input:checked::after {
  background-color: var(--text-color-light, #6b7280);
}

/* Subtle styling to indicate this is a placeholder */
.wd-contact-form .radio-placeholder-input:checked + .radio-placeholder-label {
  color: var(--text-color-light, #6b7280);
  font-style: italic;
}
/* ==== FILE UPLOAD ==== */
.wd-contact-form .file-upload-wrapper,
.wd-contact-form .wd-file-input-wrapper {
  position: relative;
  border: 2px dashed var(--separator, #e1e5e9);
  border-radius: var(--wd-form-radius);
  padding: var(--wd-spacing-xs);
  text-align: center;
  transition: var(--wd-form-transition);
  cursor: pointer;
  background: var(--background-color, #fff);
}

.wd-contact-form .file-upload-wrapper label {
  cursor: pointer;
}

.wd-contact-form .file-upload-wrapper .wd-file-input-info {
  font-size: 14px;
  font-style: italic;
  color: var(--text-color-light, #6b7280);
  margin-top: 0;
}

/* Make entire area clickable */
.wd-contact-form .file-upload-wrapper input[type="file"],
.wd-contact-form .wd-file-input-wrapper input[type="file"] {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Hover / drag highlight */
.wd-contact-form .file-upload-wrapper:hover,
.wd-contact-form .wd-file-input-wrapper:hover,
.wd-contact-form .file-upload-wrapper.drag-over,
.wd-contact-form .wd-file-input-wrapper.drag-over {
  border-color: var(--primary-color, #0073e6);
  background: var(--background-color-hover, #f8f9fa);
}

/* Info text */
.wd-contact-form .file-upload-info,
.wd-contact-form .wd-file-input-info {
  margin-top: var(--wd-spacing-sm);
  font-size: 14px;
  color: var(--text-color-light, #6b7280);
}

/* When file selected */
.wd-contact-form .wd-file-input-wrapper.has-file .file-status,
.wd-contact-form .wd-file-input-wrapper.has-file .wd-file-input-info .file-status {
  font-weight: 600;
  color: var(--text-color, #111827);
}

/* ==== SUBMIT BUTTON ==== */
.wd-contact-form .wd-form-actions {
  /*margin-top: var(--wd-spacing-lg);*/
}

.wd-contact-form .wd-form-actions .wd-submit-btn {
  width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: var(--wd-form-radius);
  background: var(--btn-color, #0073e6);
  color: var(--btn-text-color, #fff);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--wd-form-transition);
  position: relative;
  overflow: hidden;
  line-height: normal;
}

.wd-contact-form .wd-form-actions .wd-submit-btn:hover:not(:disabled) {
  /*background: var(--primary-color-hover, #005bb5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);*/
}

.wd-contact-form .wd-form-actions .wd-submit-btn:disabled {
  background: var(--separator, #e1e5e9);
  color: var(--text-color-light, #6b7280);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading states */
.wd-submit-text,
.wd-submit-loading {
  transition: var(--wd-form-transition);
}

/* Default states - show text, hide loading */
.wd-submit-text {
  display: inline-block;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

.wd-submit-loading {
  display: none;
}

/* Loading states - hide text, show loading */
.wd-submit-btn .wd-submit-text.wd-loading {
  display: none !important;
}

.wd-submit-btn .wd-submit-loading.wd-loading {
  display: inline-block !important;
}

/* ==== ERROR STATES ==== */
.wd-field-error {
  border-color: var(--wd-error-color) !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.wd-error-message {
  display: block;
  color: var(--wd-error-color);
  font-size: 13px;
  margin-top: 2px;
  line-height: normal;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide browser validation tooltips */
input:invalid,
textarea:invalid,
select:invalid {
  box-shadow: none !important;
}

/* ==== RESPONSE MESSAGES ==== */
.wd-form-response {
  margin-top: var(--wd-spacing-md);
  padding: 16px;
  border-radius: var(--wd-form-radius);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease-out;
  border: 1px solid transparent;
}

/* Response message icons */
.wd-response-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.wd-response-error-icon {
  font-size: 1.2rem;
  margin-right: 8px;
  color: var(--wd-error-color);
}

.wd-form-response.wd-response-hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
}

.wd-form-response.wd-response-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideIn 0.3s ease-out;
}

/* ==== SUCCESS OVERLAY ==== */
.wd-form-response.success {
  background: rgba(108, 117, 125, 0.95);
  color: white;
  border-color: rgba(108, 117, 125, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  border-radius: var(--wd-form-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(108, 117, 125, 0.3);
}

.wd-form-response.success .wd-response-text {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 20px;
  max-width: 80%;
}

.wd-form-response.success .wd-response-dismiss {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--wd-form-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 20px;
  right: 20px;
}

.wd-form-response.success .wd-response-dismiss:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* ==== ERROR MESSAGES (INLINE) ==== */
.wd-form-response.error {
  background: rgba(220, 53, 69, 0.1);
  color: var(--wd-error-color);
  border-color: rgba(220, 53, 69, 0.3);
  position: relative;
}

.wd-form-response.error .wd-response-dismiss {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--wd-error-color);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.wd-form-response.error .wd-response-dismiss:hover {
  opacity: 1;
}

/* ==== FORM CONTAINER POSITIONING ==== */
.wd-contact-form-inner {
  position: relative;
  overflow: hidden;
}

/* ==== ANIMATIONS ==== */
@keyframes successPulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==== TURNSTILE ==== */
.wd-form-turnstile {
  display: flex;
  justify-content: center;
  margin: var(--wd-spacing-md) 0;
  min-height: 65px;
}

.wd-form-turnstile.wd-turnstile-invisible {
  height: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

/* ==== MULTI-STEP FORMS ==== */
.wd-form-step-nav {
  display: flex;
  justify-content: center;
  gap: var(--wd-spacing-sm);
  margin-bottom: var(--wd-spacing-lg);
  padding-bottom: var(--wd-spacing-md);
  border-bottom: 1px solid var(--separator, #e1e5e9);
}

.wd-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wd-spacing-xs);
  min-width: 80px;
  text-align: center;
  cursor: pointer;
}

.wd-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--separator, #e1e5e9);
  color: var(--text-color-light, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: var(--wd-form-transition);
}

.wd-step-title {
  font-size: 12px;
  color: var(--text-color-light, #6b7280);
  font-weight: 500;
}

.wd-step-indicator.wd-step-current .wd-step-number {
  background: var(--primary-color, #0073e6);
  color: white;
}

.wd-step-indicator.wd-step-current .wd-step-title {
  color: var(--primary-color, #0073e6);
  font-weight: 600;
}

.wd-step-indicator.wd-step-completed .wd-step-number {
  background: var(--wd-success-color);
  color: white;
}

.wd-step-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--wd-spacing-sm);
  margin-top: var(--wd-spacing-lg);
  padding-top: var(--wd-spacing-md);
  border-top: 1px solid var(--separator, #e1e5e9);
}

.wd-btn-prev,
.wd-btn-next {
  padding: 12px 24px;
  border: 2px solid var(--primary-color, #0073e6);
  background: transparent;
  color: var(--primary-color, #0073e6);
  border-radius: var(--wd-form-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--wd-form-transition);
  min-width: 100px;
}

.wd-btn-next {
  background: var(--primary-color, #0073e6);
  color: white;
}

.wd-btn-prev:hover,
.wd-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
}

.wd-btn-prev:hover {
  background: var(--primary-color, #0073e6);
  color: white;
}

/* ==== UTILITY CLASSES ==== */
.wd-hidden {
  display: none !important;
}
.wd-visible {
  display: block !important;
}

/* Template selector styling */
.wd-template-selector-container {
  margin-bottom: 1rem;
}

.wd-template-label {
  margin-right: 10px;
}

/* Additional visibility classes for JavaScript */
.wd-field-conditionally-hidden {
  display: none !important;
}
.wd-field-conditionally-visible {
  display: block !important;
}
.wd-form-step.wd-step-hidden {
  display: none !important;
}
.wd-form-step.wd-step-visible {
  display: block !important;
}
.wd-nav-hidden {
  display: none !important;
}
.wd-nav-visible {
  display: block !important;
}
.wd-submit-hidden {
  display: none !important;
}
.wd-submit-visible {
  display: block !important;
}

/* Form interaction states */
.wd-form-disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 768px) {
  .wd-contact-form-inner {
    padding: var(--wd-spacing-md);
  }

  .wd-form-step-nav {
    margin-bottom: var(--wd-spacing-md);
  }

  .wd-step-indicator {
    margin-bottom: var(--wd-spacing-sm);
  }

  .wd-step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .wd-step-title {
    font-size: 14px;
  }

  .wd-step-actions {
    flex-direction: column;
  }

  .wd-btn-prev,
  .wd-btn-next {
    width: 100%;
    margin: 4px 0;
  }

  /* Mobile responsiveness for success overlay */
  .wd-form-response.success {
    padding: 20px;
  }

  .wd-form-response.success::before {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .wd-form-response.success .wd-response-text {
    font-size: 1.1rem;
    max-width: 90%;
  }

  .wd-form-response.success .wd-response-dismiss {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .wd-contact-form-inner {
    padding: var(--wd-spacing-sm);
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ==== ACCESSIBILITY ==== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==== HIGH CONTRAST MODE ==== */
@media (prefers-contrast: high) {
  .wd-field-input,
  input,
  textarea,
  select {
    border-width: 3px;
  }

  .wd-submit-btn {
    border: 3px solid var(--primary-color, #0073e6);
  }
}

/* ==== PRINT STYLES ==== */
@media print {
  .wd-form-turnstile,
  .wd-form-step-nav,
  .wd-step-actions,
  .wd-submit-btn {
    display: none !important;
  }

  .wd-contact-form-inner {
    box-shadow: none;
    border: 1px solid #000;
  }
}

.wd-contact-form .wd-file-input-wrapper.has-file {
  border-color: var(--primary-color, #0073e6);
}