/* ============================================
   IBCT Partnership Form - Material Design Styling
   COMPLETE VERSION WITH SCROLL FIX
   Modern, Elegant, and Accessible
   ============================================ */

/* === ROOT VARIABLES === */
:root {
  --primary-color: #1976d2;
  --primary-dark: #1565c0;
  --primary-light: #42a5f5;
  --accent-color: #ff4081;
  --text-primary: #212121;
  --text-secondary: #757575;
  --divider-color: #e0e0e0;
  --background-light: #fafafa;
  --error-color: #d32f2f;
  --success-color: #388e3c;
  --border-radius: 4px;
  --elevation-1: 0 2px 4px rgba(0, 0, 0, 0.1);
  --elevation-2: 0 4px 8px rgba(0, 0, 0, 0.12);
  --elevation-3: 0 8px 16px rgba(0, 0, 0, 0.15);
  --transition-base: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* === FORM CONTAINER === */
.gform_wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  scroll-behavior: auto !important;
}

.gform_wrapper form {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--elevation-2);
  padding: 48px;
  margin: 32px 0;
}

@media (max-width: 768px) {
  .gform_wrapper form {
    padding: 24px;
    margin: 16px 0;
  }
}

/* === FORM TITLE === */
.gform_wrapper .gform_heading {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary-color);
}

.gform_wrapper .gform_title {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  letter-spacing: 0.5px;
}

.gform_wrapper .gform_description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* === FORM BODY === */
.gform_wrapper .gform_body {
  margin-bottom: 24px;
}

.gform_wrapper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gform_wrapper li.gfield {
  margin: 0 0 32px 0;
  padding: 0;
  clear: both;
}

/* === SECTION HEADERS === */
.gform_wrapper .gsection {
  border-top: 2px solid var(--primary-color);
  padding: 24px 0 16px 0;
  margin: 48px 0 32px 0;
}

.gform_wrapper .gsection .gsection_title {
  font-size: 22px;
  font-weight: 500;
  color: var(--primary-color);
  margin: 0 0 8px 0;
  letter-spacing: 0.3px;
}

.gform_wrapper .gsection .gsection_description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* === FIELD LABELS === */
.gform_wrapper .gfield_label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  display: block;
  letter-spacing: 0.2px;
}

.gform_wrapper .gfield_required {
  color: var(--error-color);
  margin-left: 4px;
  font-weight: 500;
}

.gform_wrapper .gfield_description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* === TEXT INPUTS & TEXTAREAS === */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper input[type="number"],
.gform_wrapper textarea,
.gform_wrapper select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--divider-color);
  border-radius: var(--border-radius);
  transition: var(--transition-base);
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.gform_wrapper input[type="text"]:focus,
.gform_wrapper input[type="email"]:focus,
.gform_wrapper input[type="tel"]:focus,
.gform_wrapper input[type="url"]:focus,
.gform_wrapper input[type="number"]:focus,
.gform_wrapper textarea:focus,
.gform_wrapper select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
  background: #fafafa;
}

.gform_wrapper input[type="text"]:hover,
.gform_wrapper input[type="email"]:hover,
.gform_wrapper input[type="tel"]:hover,
.gform_wrapper input[type="url"]:hover,
.gform_wrapper input[type="number"]:hover,
.gform_wrapper textarea:hover,
.gform_wrapper select:hover {
  border-color: var(--text-secondary);
}

.gform_wrapper textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* === SELECT DROPDOWNS === */
.gform_wrapper select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23757575' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 24px;
  padding-right: 40px;
}

/* === RADIO BUTTONS === */
.gform_wrapper .gfield_radio {
  margin: 0;
  padding: 0;
}

.gform_wrapper .gfield_radio li {
  margin: 0 0 24px 0 !important;
  padding: 0;
  position: relative;
}

/* SCROLL FIX: Hide radio inputs completely */
/* SCROLL FIX: Hide radio inputs completely */
/* SCROLL FIX: Hide radio inputs completely */
.gform_wrapper input[type="radio"] {
  opacity: 0 !important;
  position: absolute !important;
  /* Make the input cover the whole item so if it IS focused, browser thinks it's already in view */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  z-index: -1 !important;
  /* Remove clip to ensure it has physical size */
  clip: auto !important;
  pointer-events: none !important;
  /* Ensure clicks pass through to label if z-index fails */
}

.gform_wrapper .gfield_radio label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer !important;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--background-light);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  transition: var(--transition-base);
  position: relative;
  padding-left: 48px;
  min-height: 48px;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}

.gform_wrapper .gfield_radio label:hover {
  background: #f0f0f0;
  border-color: var(--divider-color);
}

.gform_wrapper .gfield_radio label::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-secondary);
  border-radius: 50%;
  background: white;
  transition: var(--transition-base);
  box-sizing: border-box !important;
  /* Ensure consistent sizing (20px TOTAL) */
}

.gform_wrapper .gfield_radio label::after {
  content: '';
  position: absolute;
  /* PERFECT CENTERING (v3): Make the dot *wrapper* the same size as the ring (20px) at the same position (16px) */
  /* This centers it relative to the ring's own coordinates */
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;

  /* Initial state: Hidden (scale 0) */
  transform: translateY(-50%) scale(0);

  border-radius: 50%;
  background: var(--primary-color);
  transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-sizing: border-box !important;
  /* Ensure consistent sizing */
}

.gform_wrapper input[type="radio"]:checked+label {
  background: rgba(25, 118, 210, 0.08);
  border-color: var(--primary-color);
}

.gform_wrapper input[type="radio"]:checked+label::before {
  border-color: var(--primary-color);
}

.gform_wrapper input[type="radio"]:checked+label::after {
  /* Scale to 0.5 (results in 10px visual dot inside 20px box) */
  transform: translateY(-50%) scale(0.5);
}

.gform_wrapper input[type="radio"]:focus+label {
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
  outline: none !important;
}

/* === CHECKBOXES === */
.gform_wrapper .gfield_checkbox {
  margin: 0;
  padding: 0;
}

.gform_wrapper .gfield_checkbox li {
  margin: 0 0 24px 0 !important;
  padding: 0;
  position: relative;
}

/* SCROLL FIX: Hide checkbox inputs completely */
/* SCROLL FIX: Hide checkbox inputs completely */
/* SCROLL FIX: Hide checkbox inputs completely */
.gform_wrapper input[type="checkbox"] {
  opacity: 0 !important;
  position: absolute !important;
  /* Make the input cover the whole item so if it IS focused, browser thinks it's already in view */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  z-index: -1 !important;
  /* Remove clip to ensure it has physical size */
  clip: auto !important;
  pointer-events: none !important;
}

.gform_wrapper .gfield_checkbox label {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer !important;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--background-light);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  transition: var(--transition-base);
  position: relative;
  padding-left: 48px;
  min-height: 48px;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}

.gform_wrapper .gfield_checkbox label:hover {
  background: #f0f0f0;
  border-color: var(--divider-color);
}

.gform_wrapper .gfield_checkbox label::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-secondary);
  border-radius: 3px;
  background: white;
  transition: var(--transition-base);
}

.gform_wrapper .gfield_checkbox label::after {
  content: '';
  position: absolute;
  /* Centering math: Box center is 16px + 10px = 26px. Checkmark width 6px. Center is Left + 3px. So Left = 23px. */
  left: 23px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg) scale(0);
  width: 6px;
  height: 12px;
  border: solid var(--primary-color);
  border-width: 0 2px 2px 0;
  transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.gform_wrapper input[type="checkbox"]:checked+label {
  background: rgba(25, 118, 210, 0.08);
  border-color: var(--primary-color);
}

.gform_wrapper input[type="checkbox"]:checked+label::before {
  border-color: var(--primary-color);
  background: white;
}

.gform_wrapper input[type="checkbox"]:checked+label::after {
  transform: translateY(-50%) rotate(45deg) scale(1);
}

.gform_wrapper input[type="checkbox"]:focus+label {
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
  outline: none !important;
}

/* === NAME FIELDS (FIRST/LAST) === */
.gform_wrapper .ginput_complex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gform_wrapper .ginput_complex .name_first,
.gform_wrapper .ginput_complex .name_last {
  margin: 0;
}

.gform_wrapper .ginput_complex label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}

@media (max-width: 480px) {
  .gform_wrapper .ginput_complex {
    grid-template-columns: 1fr;
  }
}

/* === EMAIL CONFIRMATION === */
.gform_wrapper .ginput_container_email {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === VALIDATION === */
.gform_wrapper li.gfield_error {
  background-color: rgba(211, 47, 47, 0.05) !important;
  border: 2px solid var(--error-color) !important;
  border-radius: var(--border-radius);
  padding: 16px !important;
  margin-bottom: 24px !important;
}

.gform_wrapper .gfield_error .gfield_label {
  color: var(--error-color);
}

.gform_wrapper .validation_message {
  color: var(--error-color);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
}

.gform_wrapper .validation_message::before {
  content: '⚠';
  margin-right: 6px;
  font-size: 16px;
}

.gform_wrapper .gfield_error input[type="text"],
.gform_wrapper .gfield_error input[type="email"],
.gform_wrapper .gfield_error input[type="tel"],
.gform_wrapper .gfield_error input[type="url"],
.gform_wrapper .gfield_error textarea,
.gform_wrapper .gfield_error select {
  border-color: var(--error-color) !important;
}

.gform_wrapper .gfield_error input:focus,
.gform_wrapper .gfield_error textarea:focus,
.gform_wrapper .gfield_error select:focus {
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2) !important;
}

/* === VALIDATION SUMMARY === */
.gform_wrapper .validation_error {
  background: rgba(211, 47, 47, 0.1);
  color: var(--error-color);
  padding: 16px 20px;
  border-left: 4px solid var(--error-color);
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  font-weight: 500;
  font-size: 15px;
}

/* === HIDDEN FIELDS === */
.gform_wrapper .gfield_visibility_hidden {
  display: none;
}

/* === SUBMIT BUTTON === */
.gform_wrapper .gform_footer {
  padding: 0;
  margin: 32px 0 0 0;
  clear: both;
}

.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"] {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: var(--elevation-1);
  min-width: 160px;
  font-family: inherit;
}

.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover {
  background: var(--primary-dark);
  box-shadow: var(--elevation-2);
  transform: translateY(-1px);
}

.gform_wrapper .gform_button:active,
.gform_wrapper input[type="submit"]:active {
  background: var(--primary-dark);
  box-shadow: var(--elevation-1);
  transform: translateY(0);
}

.gform_wrapper .gform_button:focus,
.gform_wrapper input[type="submit"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.3);
}

/* === CAPTCHA === */
.gform_wrapper .gfield_captcha_container {
  margin: 16px 0;
}

/* === CONDITIONAL FIELDS === */
.gform_wrapper .gfield_conditional_hidden {
  display: none;
}

/* === PROGRESS BAR (for multi-page forms) === */
.gform_wrapper .gf_progressbar_wrapper {
  margin: 0 0 32px 0;
}

.gform_wrapper .gf_progressbar {
  background: var(--divider-color);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.gform_wrapper .gf_progressbar_percentage {
  background: var(--primary-color);
  height: 100%;
  transition: width 0.3s ease;
}

.gform_wrapper .gf_progressbar_title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

/* === CONFIRMATION MESSAGE === */
.gform_confirmation_wrapper {
  background: rgba(56, 142, 60, 0.1);
  border-left: 4px solid var(--success-color);
  padding: 24px;
  border-radius: var(--border-radius);
  margin: 24px 0;
}

.gform_confirmation_message {
  color: var(--success-color);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

/* === ACCESSIBILITY === */
.gform_wrapper .gfield_visibility_administrative {
  position: absolute;
  left: -9999px;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gform_wrapper li.gfield {
  animation: fadeIn 0.4s ease forwards;
}

.gform_wrapper li.gfield:nth-child(1) {
  animation-delay: 0.05s;
}

.gform_wrapper li.gfield:nth-child(2) {
  animation-delay: 0.1s;
}

.gform_wrapper li.gfield:nth-child(3) {
  animation-delay: 0.15s;
}

.gform_wrapper li.gfield:nth-child(4) {
  animation-delay: 0.2s;
}

.gform_wrapper li.gfield:nth-child(5) {
  animation-delay: 0.25s;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .gform_wrapper .gform_title {
    font-size: 24px;
  }

  .gform_wrapper .gsection .gsection_title {
    font-size: 20px;
  }

  .gform_wrapper input[type="text"],
  .gform_wrapper input[type="email"],
  .gform_wrapper input[type="tel"],
  .gform_wrapper textarea,
  .gform_wrapper select {
    font-size: 16px;
  }
}

/* === PRINT STYLES === */
@media print {
  .gform_wrapper form {
    box-shadow: none;
    padding: 0;
  }

  .gform_wrapper .gform_button,
  .gform_wrapper input[type="submit"] {
    display: none;
  }
}

/* === CUSTOM ADDITIONS FOR SPECIFIC FIELDS === */

/* Other field (conditional) styling */
.gform_wrapper .gfield_conditional {
  margin-top: 16px;
  padding-left: 16px;
  border-left: 3px solid var(--primary-light);
  background: rgba(25, 118, 210, 0.02);
  padding: 16px;
  border-radius: var(--border-radius);
}

/* File upload fields */
.gform_wrapper input[type="file"] {
  padding: 12px;
  border: 2px dashed var(--divider-color);
  border-radius: var(--border-radius);
  background: var(--background-light);
  cursor: pointer;
  transition: var(--transition-base);
}

.gform_wrapper input[type="file"]:hover {
  border-color: var(--primary-color);
  background: rgba(25, 118, 210, 0.05);
}

/* === LOADING STATE === */
.gform_wrapper.gform_validation_error {
  position: relative;
}

.gform_ajax_spinner {
  margin-left: 12px;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(25, 118, 210, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === FOCUS VISIBLE (for keyboard navigation) === */
.gform_wrapper *:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* === HIGH CONTRAST MODE SUPPORT === */
@media (prefers-contrast: high) {

  .gform_wrapper input[type="text"],
  .gform_wrapper input[type="email"],
  .gform_wrapper input[type="tel"],
  .gform_wrapper textarea,
  .gform_wrapper select {
    border-width: 2px;
  }

  .gform_wrapper .gform_button,
  .gform_wrapper input[type="submit"] {
    border: 2px solid transparent;
  }
}

/* === ADDITIONAL SCROLL FIX === */
.gform_wrapper,
.gform_wrapper * {
  scroll-behavior: auto !important;
}

.et_pb_module .gform_wrapper {
  scroll-behavior: auto !important;
}