/**
 * Newsletter AJAX Messages - COMPLETE PRODUCTION INLINE STYLE
 */

/* Container wrapper styling - sits naturally below the input block */
#newsletter-ajax-messages {
  width: 100%;
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  display: block !important;
  clear: both;
}

/* Clear core overrides to preserve natural inline text distribution */
#newsletter-ajax-messages .messages-list,
#newsletter-ajax-messages .messages__wrapper {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Custom Inline Messages Container */
.newsletter-inline-messages {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Base style for individual text rows */
.newsletter-inline-messages p {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: left !important; /* Matches native client-side validation errors */
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  background: none !important;
  box-shadow: none !important;
}

/* Error Text Colors using Ohio Diesel Red */
.inline-msg--error {
  color: #e31b23 !important;
}

/* Success Text Colors - Pure Black */
.inline-msg--success {
  color: #000000 !important;
}

/**
 * Isolated Throbber Handling - Zero-Width Structural Footprint Fix
 */

/* 1. Add a permanent 30px padding-right to the button wrapper container.
 * This explicitly reserves a blank safety gutter for the throbber so it 
 * doesn't have to fight the email input box for layout width space.
 */
#newsletter-form-wrapper .newsletter-submit-container {
  display: inline-block !important;
  position: relative !important;
  padding-right: 30px !important; /* Pre-allocated empty space for spinner */
  margin-right: -30px !important; /* Counterbalance to maintain original theme flow */
  vertical-align: middle !important;
}

/* Ensure the red button inside remains stable and relative */
#newsletter-form-wrapper .newsletter-submit-container .Subscribe-btn {
  display: inline-block !important;
  vertical-align: middle !important;
}

/* 2. Lock the throbber using absolute positioning.
 * Setting position: absolute takes the loader completely out of the DOM width calculation.
 * It now takes up exactly 0px of space, making it physically impossible to shrink the input textfield!
 */
#newsletter-form-wrapper .newsletter-submit-container .ajax-progress-throbber {
  display: inline-block !important;
  position: absolute !important;
  
  /* Snaps it exactly inside the pre-allocated blank gutter to the right of the red button */
  left: calc(100% - 20px) !important; 
  top: 50% !important;
  transform: translateY(-50%) !important; /* Perfect pixel vertical center line alignment */
  
  margin: 0 !important;
  padding: 0 !important;
  width: 16px !important;
  height: 16px !important;
  float: none !important;
}

/* Graphical loading spinner icon image adjustments */
#newsletter-form-wrapper .newsletter-submit-container .ajax-progress-throbber .throbber {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  background-position: center !important;
}

/* Completely suppress the hidden system core processing text string layout metrics */
#newsletter-form-wrapper .newsletter-submit-container .ajax-progress .message {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/**
 * Input Box Border Highlight on Error
 */
#newsletter-form-wrapper:has(.inline-msg--error) .newsletter-input input[type="email"] {
  border: 1px solid #e31b23 !important;
}


/* Ensure the italicized emphasis text inside our custom messages displays perfectly */
/* Ensure the italicized emphasis text inside our custom messages displays perfectly */
.newsletter-inline-messages p em {
  font-style: italic !important;
  font-weight: 600 !important; /* Slightly bolder for nice readability contrast */
  background: none !important;  /* Strip any default theme backgrounds */
  padding: 0 !important;
}