legend {
  font-size:inherit;
}
.webform-required {
  display:none;
}

/*---------------------------------------------------------------------------*/
/* Base (mobile-first): stack Next above Previous, center both               */
/*---------------------------------------------------------------------------*/
.webform-ajax-form-wrapper .form-actions {
  display: flex !important;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.webform-ajax-form-wrapper .form-actions .form-control {
  width: auto !important;
  flex: 0 1 auto !important;
}

/* breathing room when stacked */
.webform-ajax-form-wrapper .form-actions .form-control + .form-control {
  margin-top: 0.5rem !important;
}

/*---------------------------------------------------------------------------*/
/* Shrink & de-emphasize the “Previous” button                                */
/*---------------------------------------------------------------------------*/
.webform-ajax-form-wrapper .form-actions .webform-button--previous {
  background-color: transparent !important;
  border: 1px solid #6c757d !important;
  color: #6c757d !important;
  padding: 0.4rem 0.8rem !important;
  font-size: 0.875rem !important;
  box-shadow: none !important;
}

/*---------------------------------------------------------------------------*/
/* Make the “Next” button pop                                                */
/*---------------------------------------------------------------------------*/
.webform-ajax-form-wrapper .form-actions .webform-button--next {
  background-color: #126a9e !important;
  border-color: #126a9e !important;
  color: #fff !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

.webform-ajax-form-wrapper .form-actions .webform-button--next:hover {
  background-color: #105c8b !important;
  border-color: #105c8b !important;
}

/*---------------------------------------------------------------------------*/
/* Tablet/desktop and up: horizontal row, align right                        */
/*---------------------------------------------------------------------------*/
@media (min-width: 768px) {
  .webform-ajax-form-wrapper .form-actions {
    flex-direction: row !important;
    justify-content: flex-end !important;
  }
  .webform-ajax-form-wrapper .form-actions .form-control + .form-control {
    margin-top: 0 !important;
    margin-left: 0.75rem !important;
  }
}

/*************************************
  FORM CONTAINER
*************************************/


/*************************************
  HEADINGS & SPACING
*************************************/


/* Tighten spacing for any .mb-3 elements within the form */
.webform-submission-form .mb-3 {
  margin-bottom: 0.5rem !important; 
}

/*************************************
  FORM ITEMS
*************************************/
/* Slightly reduce spacing between form items for compactness */
.webform-submission-form .form-item,
.webform-submission-form .form-group {
  margin-bottom: 0.65rem; /* was typically 1rem, now tighter */
}

/* Labels remain clearly readable but not huge */
.webform-submission-form label {
  font-weight: 400;
  margin-bottom: 0.3rem;
}

/*************************************
  INPUTS, SELECTS, TEXTAREAS
*************************************/
/* Subtle background and border to "stand out" but not overwhelm */
.webform-submission-form input[type="text"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="number"],
.webform-submission-form input[type="tel"],
.webform-submission-form input[type="url"],
.webform-submission-form select,
.webform-submission-form textarea {
  background-color: #fff;
  border: 1px solid #333;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem; /* standard Bootstrap form control padding */
  width: 100%;             /* ensure full-width in a form-group */
  box-sizing: border-box;
}

/* On focus, give a clear outline for accessibility */
.webform-submission-form input:focus,
.webform-submission-form select:focus,
.webform-submission-form textarea:focus {
  outline: 2px solid #126a9e; 
  outline-offset: 1px;
  border-color: #126a9e;   /* border matches outline for consistency */
}

/*************************************
  CHECKBOXES & RADIOS
*************************************/
.webform-submission-form .form-check {
  margin-bottom: 0.4rem; /* tighter than default */
}

/* Optional: slightly increase radio/checkbox size for easier clicks 
   (uncomment if desired) */
/*
.webform-submission-form .form-check-input {
  transform: scale(1.1);
  margin-right: 0.5rem;
}
*/

/* On focus, show clear outline */
.webform-submission-form .form-check-input:focus {
  outline: 2px solid #126a9e;
  outline-offset: 1px;
}

/*************************************
  WIZARD NAVIGATION
*************************************/
.webform-wizard-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.webform-wizard-nav .nav-item {
  flex: 1 1 auto;
  text-align: center;
}

.webform-wizard-nav .nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  background-color: #e9ecef;
  color: #212529;
  text-decoration: none;
  transition: background-color 0.2s;
}

.webform-wizard-nav .nav-link:focus {
  outline: 2px solid #126a9e;
  outline-offset: 2px;
}

.webform-wizard-nav .nav-link.active,
.webform-wizard-nav .nav-link[aria-current="step"] {
  background-color: #126a9e; /* Active step color */
  color: #fff;
  font-weight: 600;
}

/* If steps can be 'completed' in your wizard, style them: */
.webform-wizard-nav .nav-link.completed {
  background-color: #198754; /* success green */
  color: #fff;
}

/*************************************
  WIZARD BUTTONS
*************************************/
/* Align and style next/previous/submit actions */
.webform-submission-form .webform-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

/* Adjust default Bootstrap .btn-primary to match DFI color #126a9e */
.webform-submission-form .btn.btn-primary,
.webform-submission-form input[type="submit"].btn-primary,
.webform-submission-form input[type="button"].btn-primary,
.webform-submission-form button.btn-primary {
  background-color: #126a9e;
  border-color: #126a9e;
}

.webform-submission-form .btn.btn-primary:hover,
.webform-submission-form .btn.btn-primary:focus,
.webform-submission-form input[type="submit"].btn-primary:hover,
.webform-submission-form input[type="submit"].btn-primary:focus,
.webform-submission-form button.btn-primary:hover,
.webform-submission-form button.btn-primary:focus {
  background-color: #105c8b; /* darker hover/focus state */
  border-color: #105c8b;
}

/*************************************
  OPTIONAL PROGRESS BAR (IF USED)
*************************************/
.webform-wizard-progress .progress {
  height: 0.5rem;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.webform-wizard-progress .progress-bar {
  background-color: #126a9e;
  transition: width 0.3s ease;
}

/*************************************
  RESPONSIVENESS
*************************************/
/* Slightly smaller base font for entire form, still accessible */


/* Ensure fields remain full-width on mobile */
@media (max-width: 576px) {
  .webform-submission-form .form-item,
  .webform-submission-form .form-group {
    width: 100%;
  }
}
/*************************************
  ACTIONS WRAPPER (EDIT-ACTIONS--2)
*************************************/
#edit-actions--2 {
  /* Use Flexbox so buttons can be side by side */
  display: flex;
  flex-wrap: wrap;       /* allow wrapping on small screens */
  gap: 0.75rem;          /* space between buttons */
  justify-content: flex-end; /* align buttons to the right (or change as desired) */
  margin-bottom: 1rem;   /* space below actions */
}

/* By default, .form-control sets inputs to 100% width.
   Override that so they can size automatically. */
#edit-actions--2 .form-control {
  width: auto !important; 
  flex: 0 1 auto; /* let them shrink or grow as needed */
}

/*************************************
  RESPONSIVE BEHAVIOR
*************************************/
@media (max-width: 576px) {
  #edit-actions--2 {
    flex-direction: column;  /* stack buttons vertically on small screens */
    align-items: stretch;    /* make them full width when stacked */
  }
  #edit-actions--2 .form-control {
    width: 100% !important;  /* each button is full width on mobile */
    max-width: 100%;
  }
}

/*************************************
  SAVE DRAFT BUTTON (GREY STYLE)
*************************************/
/* Specifically target the Save Draft input
   using the unique class "webform-button--draft" */
.webform-button--draft {
  background-color: #6c757d !important; /* gray background */
  border-color: #6c757d !important;
  color: #fff !important;
}

.webform-button--draft:hover,
.webform-button--draft:focus {
  background-color: #5b6369 !important; /* darker hover/focus */
  border-color: #565e63 !important;
}

/*************************************
  PREVIOUS/NEXT (BLUE) BUTTONS
*************************************/
/* You already have them set to btn-primary, 
   which uses #126a9e from your existing overrides. 
   If you need to restyle them further, do so here. */
.webform-button--previous.btn-primary,
.webform-button--next.btn-primary {
  /* Example to ensure they use your brand blue */
  background-color: #126a9e !important;
  border-color: #126a9e !important;
}

.webform-button--previous.btn-primary:hover,
.webform-button--previous.btn-primary:focus,
.webform-button--next.btn-primary:hover,
.webform-button--next.btn-primary:focus {
  background-color: #105c8b !important;
  border-color: #105c8b !important;
}
