/*
 * YMCA of Greater Tulsa — gravity-forms.css
 * Global Gravity Forms styling to match site brand
 *
 * Enqueue this in functions.php:
 * wp_enqueue_style( 'ymca-gravity-forms', get_template_directory_uri() . '/assets/css/gravity-forms.css', [], wp_get_theme()->get('Version') );
 */

/* ── Reset GF defaults ── */
.gform_wrapper * {
  box-sizing: border-box;
}
.gform_wrapper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ════════════════════════════════════════
   FORM WRAPPER
════════════════════════════════════════ */
.gform_wrapper {
  font-family: var(--font-body, "Noto Serif", Georgia, serif);
  font-size: 15px;
  color: #3a3a3a;
  max-width: 100%;
}

/* ════════════════════════════════════════
   FORM TITLE & DESCRIPTION
════════════════════════════════════════ */
.gform_title {
  font-family: var(--font-heading, "CachetPro", sans-serif);
  font-size: 26px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.gform_description {
  font-size: 15px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ════════════════════════════════════════
   FIELD GROUPS & LABELS
════════════════════════════════════════ */
.gform_fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gfield_label {
  font-family: var(--font-heading, "CachetPro", sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.gfield_required {
  color: var(--green, #1d9e75);
  margin-left: 2px;
}

.gfield_description {
  font-size: 12.5px;
  color: #888;
  line-height: 1.55;
  margin-top: 2px;
}

/* ════════════════════════════════════════
   INPUTS, TEXTAREAS, SELECTS
════════════════════════════════════════ */
.gfield input[type="text"],
.gfield input[type="email"],
.gfield input[type="tel"],
.gfield input[type="url"],
.gfield input[type="number"],
.gfield input[type="password"],
.gfield input[type="date"],
.gfield input[type="time"],
.gfield select,
.gfield textarea,
.ginput_complex input,
.ginput_complex select {
  width: 100%;
  font-family: var(--font-body, "Noto Serif", Georgia, serif);
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  border: 1.5px solid #d8d8d8;
  border-radius: 5px;
  padding: 11px 14px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.gfield input[type="text"]:focus,
.gfield input[type="email"]:focus,
.gfield input[type="tel"]:focus,
.gfield input[type="url"]:focus,
.gfield input[type="number"]:focus,
.gfield input[type="password"]:focus,
.gfield input[type="date"]:focus,
.gfield select:focus,
.gfield textarea:focus,
.ginput_complex input:focus,
.ginput_complex select:focus {
  border-color: var(--green, #1d9e75);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

.gfield input::placeholder,
.gfield textarea::placeholder {
  color: #bbb;
}

/* Textarea */
.gfield textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

/* Select arrow */
.gfield select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ════════════════════════════════════════
   RADIO & CHECKBOX
════════════════════════════════════════ */
.gfield_radio,
.gfield_checkbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gfield_radio li,
.gfield_checkbox li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gfield_radio input[type="radio"],
.gfield_checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--green, #1d9e75);
  cursor: pointer;
  margin: 0;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
}

.gfield_radio label,
.gfield_checkbox label {
  font-size: 14px;
  color: #3a3a3a;
  cursor: pointer;
  line-height: 1.4;
}

/* ════════════════════════════════════════
   COMPLEX FIELDS (Name, Address)
════════════════════════════════════════ */
.ginput_complex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ginput_complex.ginput_complex_full,
.ginput_complex.ginput_address {
  grid-template-columns: 1fr;
}
.ginput_complex span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ginput_complex label {
  font-size: 11.5px;
  color: #888;
  font-family: "Noto Serif";
  text-transform: none;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

/* ════════════════════════════════════════
   FILE UPLOAD
════════════════════════════════════════ */
.gfield input[type="file"] {
  font-family: var(--font-body, "Noto Serif", Georgia, serif);
  font-size: 13px;
  color: #555;
  border: 1.5px dashed #d8d8d8;
  border-radius: 5px;
  padding: 12px 14px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s;
}
.gfield input[type="file"]:hover {
  border-color: var(--green, #1d9e75);
}

/* ════════════════════════════════════════
   SECTION BREAKS
════════════════════════════════════════ */
.gsection {
  border-top: 0.5px solid #ebebeb;
  padding-top: 24px;
  margin-top: 8px;
}
.gsection_title {
  font-family: var(--font-heading, "CachetPro", sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.gsection_description {
  font-size: 13px;
  color: #888;
  line-height: 1.55;
}

/* ════════════════════════════════════════
   SUBMIT BUTTON
════════════════════════════════════════ */
.gform_footer,
.gform_page_footer {
  margin-top: 8px;
  padding-top: 4px;
}

.gform_button,
.gform_next_button,
.gform_previous_button,
input[type="submit"].gform_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, "CachetPro", sans-serif) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: var(--green, #1d9e75) !important;
  border: 1.5px solid var(--green, #1d9e75) !important;
  border-radius: 4px !important;
  padding: 13px 36px !important;
  cursor: pointer !important;
  transition:
    background 0.15s,
    border-color 0.15s !important;
  -webkit-appearance: none;
  appearance: none;
  width: auto;
}
.gform_button:hover,
.gform_next_button:hover,
input[type="submit"].gform_button:hover {
  background: var(--green-dk, #0f6e56) !important;
  border-color: var(--green-dk, #0f6e56) !important;
}
.gform_previous_button {
  background: transparent !important;
  color: var(--blue, #0060af) !important;
  border-color: var(--blue, #0060af) !important;
  margin-right: 10px;
}
.gform_previous_button:hover {
  background: var(--blue, #0060af) !important;
  color: #fff !important;
}

/* ════════════════════════════════════════
   VALIDATION & ERRORS
════════════════════════════════════════ */
.gform_validation_errors {
  background: #fff5f5;
  border: 1.5px solid #e8a0a0;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #c0392b;
}
.gform_validation_errors h2 {
  font-family: var(--font-heading, "CachetPro", sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: #c0392b;
  margin: 0 0 6px;
}
.gfield_error input,
.gfield_error select,
.gfield_error textarea {
  border-color: #e8a0a0 !important;
  background: #fffafa !important;
}
.gfield_error .gfield_label {
  color: #c0392b;
}
.validation_message {
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ════════════════════════════════════════
   CONFIRMATION MESSAGE
════════════════════════════════════════ */
.gform_confirmation_wrapper {
  background: #eff5f2;
  border: 1.5px solid #c8e0d8;
  border-radius: 8px;
  padding: 28px 32px;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.7;
}
.gform_confirmation_message {
  color: #1a1a1a;
}
.gform_confirmation_message p:last-child {
  margin-bottom: 0;
}

/* ════════════════════════════════════════
   PROGRESS BAR (multi-page forms)
════════════════════════════════════════ */
.gf_progressbar_wrapper {
  margin-bottom: 28px;
}
.gf_progressbar {
  background: #e8e8e8;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}
.gf_progressbar_percentage {
  background: var(--green, #1d9e75);
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s ease;
}
.percentbar_blue .gf_progressbar_percentage {
  background: var(--blue, #0060af);
}
.gf_step_count {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  text-align: right;
}

.gform_wrapper.gravity-theme .gfield_label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0;
  display: inline-block;
  padding: 0;
  font-family: "NOTO SERIF";
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 640px) {
  .ginput_complex {
    grid-template-columns: 1fr;
  }
  .gform_button,
  input[type="submit"].gform_button {
    width: 100% !important;
    text-align: center;
  }
}
