.invite-code-modal-window  .ui-dialog.ui-widget.ui-widget-content {
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 0;
  font-family: inherit;
}
.invite-code-modal-window .ui-dialog .ui-dialog-titlebar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #eaeaea;
  border-radius: 12px 12px 0 0;
  padding: 15px 20px;
  font-weight: 600;
}
.invite-code-modal-window .ui-dialog .ui-dialog-titlebar-close {
  border: none;
  background: transparent;
  margin-top: -10px;
}
#invite-code-form-wrapper {
  padding: 20px;
  text-align: center;
}
#invite-code-form-wrapper .form-item {
  margin-bottom: 20px;
  text-align: left;
}
#invite-code-form-wrapper input.form-text {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}
#invite-code-form-wrapper input.form-text:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}
#invite-code-form-wrapper input.button--primary,
#invite-code-form-wrapper input.button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}
#invite-code-form-wrapper input.button:hover {
  background-color: #0056b3;
}
#invite-code-form-wrapper .messages {
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 14px;
  text-align: left;
}
#invite-code-form-wrapper .messages--error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
#invite-code-form-wrapper .messages--status {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Ensure the form wrapper layout uses a clean vertical column layout */
#invite-code-form-wrapper form {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* Makes fields and buttons match widths */
}

/* Style the text field container */
#invite-code-form-wrapper .js-form-item,
#invite-code-form-wrapper .form-item {
  margin-bottom: 15px; /* Adds space directly below the text field */
  display: block;
  width: 100%;
}

/* Ensure the text field input takes up full width */
#invite-code-form-wrapper input.form-text {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

/* Style the actions wrapper directly under the field */
#invite-code-form-wrapper .form-actions {
  margin-top: 5px;
  margin-bottom: 0;
  display: block;
  width: 100%;
}

/* Make the Bootstrap button fill the width nicely under the field */
#invite-code-form-wrapper .btn-primary {
  width: 100%;
  display: block;
  padding: 10px 20px;
}

/* ==========================================
   Large Screens / Desktop Centering Styles
   ========================================== */
@media (min-width: 992px) {
  /* Force the popup container to be dead center on desktop viewports */
  body .ui-dialog.ui-widget.ui-widget-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* Make the popup slightly wider on large screens for better readability */
    width: 450px !important; 
    max-width: 90% !important;
    height: auto !important;
  }

  /* Overlay background blur for a modern look on large screens */
  body .ui-widget-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    opacity: 1 !important;
    position: fixed !important;
  }
}

.invite-code-modal-window .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    text-align: center;
}

.invite-code-modal-window  .invite-button  {
    
}

.invite-code-modal-window  .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset  {
    float: none!important;
}

.invite-code-modal-window  .ui-dialog-titlebar {
    background-color: #ff6b35;
    border-bottom: 1px solid #eaeaea;
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
    font-weight: 600;
    color: #fff;
}

/* ==========================================
   Red Error Message Styling for the Modal
   ========================================== */

/* Target the error message container inside our invite code wrapper */
#invite-code-form-wrapper .messages--error,
#invite-code-form-wrapper .alert-danger,
#invite-code-form-wrapper .form-item--error-message {
  background-color: #fff5f5 !important; /* Soft, light red background */
  color: #e53e3e !important;           /* Deep crimson red text for high legibility */
  border: 1px solid #feb2b2 !important; /* Light red/pink border line */
  border-left: 5px solid #e53e3e !important; /* Bold thick red accent bar on the left */
  padding: 12px 16px !important;
  margin-bottom: 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: left !important;
  box-shadow: 0 2px 4px rgba(229, 62, 62, 0.05) !important;
  display: flex;
  align-items: center;
}

/* Optional: Style the actual input field outline to turn red when invalid */
#invite-code-form-wrapper input.error,
#invite-code-form-wrapper input.form-text.error,
#invite-code-form-wrapper .form-item .error {
  border-color: #e53e3e !important;
  background-color: #fffafb !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
}

/* Style the field label above a failing input field */
#invite-code-form-wrapper .form-item label.error {
  color: #e53e3e !important;
  font-weight: 600;
}

.node-event-coupons-view-form {
    background: #f4f4f4;
    padding: 10px;
    width: 50%;
}