/* ──────────────────────────────────────────────────────────────────────────
   Gravity Forms — Teamed v3 base styling.

   A single shared uplift for EVERY Gravity Form (the audit found ~15 forms,
   none on the v3 standard, and no global GF stylesheet). Grounded in the
   Teamed design system: teal #00A896 for ACTION only, DM Serif Display form
   titles, DM Sans fields, 6px input/button radius, brand input borders + teal
   focus ring.

   Deliberately CONSERVATIVE: typography + input/button/label/validation visual
   styling only — NO layout overrides — so it improves the plain forms without
   breaking the carefully-built ones (pricing modal, hire-offer Stripe field).
   Per-form scoped CSS that needs to win can out-specify these selectors.

   Enqueued site-wide (functions.php) but only takes effect where a
   .gform_wrapper actually renders.
   ────────────────────────────────────────────────────────────────────────── */

.gform_wrapper {
  --tf-teal: #00A896;
  --tf-teal-dark: #007A6E;
  --tf-dark: #1A2B2A;
  --tf-mid: #3D5250;
  --tf-gray: #6B7B7A;
  --tf-border: #E2EEEC;
  --tf-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tf-serif: 'DM Serif Display', Georgia, serif;
  font-family: var(--tf-sans);
  color: var(--tf-mid);
}

.gform_wrapper input,
.gform_wrapper textarea,
.gform_wrapper select,
.gform_wrapper button,
.gform_wrapper label,
.gform_wrapper span,
.gform_wrapper li,
.gform_wrapper .gform_description {
  font-family: var(--tf-sans);
}

/* Form title → DM Serif Display (matches page titles) */
.gform_wrapper .gform_title {
  font-family: var(--tf-serif) !important;
  font-weight: 400 !important;
  font-size: 24px !important;
  line-height: 1.15 !important;
  color: var(--tf-dark) !important;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.gform_wrapper .gform_description {
  color: var(--tf-gray);
  font-size: 14px;
}

/* Labels */
.gform_wrapper .gfield_label,
.gform_wrapper legend.gfield_label {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--tf-dark);
  margin-bottom: 6px;
}
.gform_wrapper .gfield_required { color: var(--tf-teal-dark); }

/* Text inputs / textareas / selects */
.gform_wrapper .ginput_container input[type="text"],
.gform_wrapper .ginput_container input[type="email"],
.gform_wrapper .ginput_container input[type="tel"],
.gform_wrapper .ginput_container input[type="number"],
.gform_wrapper .ginput_container input[type="url"],
.gform_wrapper .ginput_container input[type="password"],
.gform_wrapper .ginput_container input[type="date"],
.gform_wrapper .ginput_container textarea,
.gform_wrapper .ginput_container select {
  font-size: 14.5px !important;
  color: var(--tf-dark) !important;
  border: 1px solid var(--tf-border) !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gform_wrapper .ginput_container input:focus,
.gform_wrapper .ginput_container textarea:focus,
.gform_wrapper .ginput_container select:focus {
  border-color: var(--tf-teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.16) !important;
  outline: none !important;
}
.gform_wrapper input::placeholder,
.gform_wrapper textarea::placeholder { color: var(--tf-gray); }

/* Submit / form buttons — action → teal */
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"].gform_button,
.gform_wrapper button.gform_button {
  background: var(--tf-teal) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 11px 22px !important;
  font: 600 14px/1 var(--tf-sans) !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.15s;
}
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_button:hover {
  background: var(--tf-teal-dark) !important;
}

/* Radios & checkboxes (Teamed checkbox = white check on teal fill per brand;
   keep light here — full custom control is per-surface) */
.gform_wrapper .gfield_radio label,
.gform_wrapper .gfield_checkbox label {
  font-weight: 400;
  color: var(--tf-mid);
}

/* Validation */
.gform_wrapper .gfield_error .gfield_label { color: #A8323A !important; }
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error textarea,
.gform_wrapper .gfield_error select { border-color: #D98A8A !important; }
.gform_wrapper .validation_message,
.gform_wrapper .gfield_validation_message {
  color: #A8323A !important;
  font-size: 12.5px;
  font-weight: 500;
}
.gform_wrapper .gform_validation_errors,
.gform_wrapper .validation_error {
  background: #FBEAEA !important;
  border: 1px solid #F0C9C9 !important;
  border-radius: 8px !important;
  color: #A8323A !important;
  padding: 12px 14px !important;
  font-weight: 500;
}

/* ── Schedule Interview modal (GF form 40) chrome ──────────────────────────
   The form fields inside .form-body already get the v3 styling above. This is
   a conservative font/colour uplift of the modal HEADER/chrome over the legacy
   dash-style.css popup — fonts + brand colours only, no layout changes. */
.schedule-popup-wrap .schedule-popup-body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.schedule-popup-wrap .popup-head h4 {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-weight: 400 !important;
  font-size: 20px !important;
  color: #1A2B2A !important;
}
.schedule-popup-wrap .teammate-info img { border-radius: 999px; }
.schedule-popup-wrap .popup-head .close-icon { color: #6B7B7A; }

/* ── Schedule Interview = right-side drawer (matches the quick-message drawer).
   Overrides the legacy CENTERED modal, which is defined as
   `.schedule-popup-wrap .schedule-popup-body` (0,0,2,0) in BOTH custom.css
   (twice) and dash-style.css. The leading `body` bumps specificity to (0,0,2,1)
   so this wins regardless of stylesheet load order. Open/close still uses the
   existing fadeIn/fadeOut on .schedule-popup-wrap (no JS change). */
body .schedule-popup-wrap .schedule-popup-body {
  max-width: 520px;
  width: 94vw;
  top: 0;
  right: 0;
  left: auto;
  transform: none;
  height: 100%;
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(26, 43, 42, 0.18);
  display: flex;
  flex-direction: column;
}
body .schedule-popup-wrap .schedule-popup-body .form-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
body .schedule-popup-wrap .schedule-popup-body .popup-head { flex: none; }
.schedule-popup-wrap { background-color: rgba(26, 43, 42, 0.42); }
@media (max-width: 560px) {
  body .schedule-popup-wrap .schedule-popup-body { max-width: 100%; width: 100%; }
}

/* ── Schedule Interview drawer field polish (feedback 2026-06-09) ───────────
   Smaller header avatar; hide the FontAwesome pseudo-icons on the date/time/
   text fields (FA Pro isn't reliably loaded, so they render as boxes that
   overlap the placeholder text) and reset the left padding they reserved. */
body .schedule-popup-body .teammate-info img {
  width: 84px; height: 84px; object-fit: cover; margin-bottom: 12px;
}
/* Broadened 2026-06-14: the FA pseudo-icon boxes also overlap the time
   (Start/End) fields and the Additional-Attendees email fields on pages 2/3 —
   not just page 1. Hide them everywhere in the popup + reset the reserved
   padding so placeholders aren't cut off and no icon sits behind the email. */
body .schedule-popup-body .ginput_container:before,
body .schedule-popup-body .ginput_container:after,
body .schedule-popup-body .ginput_container_date:before,
body .schedule-popup-body .ginput_container_date:after,
body .schedule-popup-body .ginput_container_text:before,
body .schedule-popup-body .ginput_container_time:before,
body .schedule-popup-body .ginput_container_email:before {
  content: none !important;
  display: none !important;
}
body .schedule-popup-body .gform_wrapper input.datepicker:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
body .schedule-popup-body .ginput_container_text input,
body .schedule-popup-body .ginput_container_time input,
body .schedule-popup-body .ginput_container_email input,
body .schedule-popup-body .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 12px !important;
}

/* ── Talent Pool inline-scheduler polish (2026-06-14) ──────────────────────
   Feedback from the inline (Talent Pool) scheduler. */
/* Context note: keep it compact so it doesn't dominate the scroll / push the
   date picker far below the fold. */
body .schedule-popup-body .schedule-context-field textarea {
  min-height: 84px !important;
  max-height: 180px !important;
}
/* Date input shouldn't hog the row from the Start/End time fields. */
body .schedule-popup-body .ginput_container_date input {
  max-width: 160px;
}
/* The inline popup sits ABOVE the candidate drawer (z-index 100001); Select2
   appends its dropdown to <body> at ~1051, so the time-zone list opened BEHIND
   the popup ("can't select a time zone"). Lift it while the scheduler is open. */
body.tp-sched-active .select2-container--open {
  z-index: 100010 !important;
}

/* ── Multi-file upload drop area (e.g. social-media form $199) ──────────────
   The drag-drop "Select files" control is NOT a .gform_button, so the submit
   rule above never reached it — it rendered with GF's default near-black fill.
   Brand it as a light-teal secondary action and tidy the drop zone. */
.gform_wrapper .gform_drop_area {
  border: 1.5px dashed var(--tf-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--tf-gray) !important;
  padding: 18px 14px !important;
  text-align: center;
}
.gform_wrapper .gform_drop_instructions { color: var(--tf-gray); font-size: 13px; }
.gform_wrapper .gform_button_select_files,
.gform_wrapper .gform_drop_area .button,
.gform_wrapper .gform_drop_area input[type="button"] {
  background: #E6F7F5 !important;
  color: var(--tf-teal-dark) !important;
  border: 1px solid rgba(0, 168, 150, 0.3) !important;
  border-radius: 6px !important;
  padding: 9px 18px !important;
  font: 600 13.5px/1 var(--tf-sans) !important;
  cursor: pointer;
  box-shadow: none !important;
  text-shadow: none !important;
}
.gform_wrapper .gform_button_select_files:hover,
.gform_wrapper .gform_drop_area .button:hover,
.gform_wrapper .gform_drop_area input[type="button"]:hover {
  background: #D8F1ED !important;
}

/* ── Hire-offer "Save Draft" — secondary button injected into the form 66
   footer next to the teal "Send offer" submit (template-ace-hire-offer.php). */
#save_as_draft.save-draft-btn {
  background: #fff !important;
  color: #007A6E !important;
  border: 1px solid #E2EEEC !important;
  border-radius: 6px !important;
  padding: 11px 22px !important;
  font: 600 14px/1 'DM Sans', -apple-system, sans-serif !important;
  cursor: pointer;
  margin-right: 12px !important;
  box-shadow: none !important;
}
#save_as_draft.save-draft-btn:hover { background: #F0F6F5 !important; }
