/* ============================================================
   Contact form — navy panel, light inputs, yellow button
   One look for the "Contact Us" form on both homepages and the
   "Need help?" form at the end of the guides. Scoped to
   .services-form-modern (added next to .services-form). Matches
   the Madrid FBI fingerprints form. Loaded after css/main.css
   (and after css/service-cards.css on the homepages, where these
   rules lived until 2026-11-16). Custom dropdowns: js/contact-form.js.
   Bump ?v= on every page's link when editing.
   ============================================================ */
.services-form-modern {
  background-color: #004c80;
  border-radius: 16px;
  padding: 32px 28px 36px;
  box-shadow: 0 14px 34px rgba(0, 76, 128, .18);
  align-items: stretch;
}

.services-form-modern form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.services-form-modern .services-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.services-form-modern input[type="name"],
.services-form-modern input[type="email"],
.services-form-modern select,
.services-form-modern textarea {
  width: 100%;
  margin-bottom: 0;
  background-color: #f1f3f5;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  padding: 12px 14px;
  color: #1a2a3a;
  font-size: .95rem;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: border-color .2s, background-color .2s;
  box-sizing: border-box;
}

.services-form-modern input::placeholder,
.services-form-modern textarea::placeholder {
  color: #7a8694;
  font-style: normal;
}

.services-form-modern select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a8694' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Grey out the "How did you find us?" placeholder until a real option is picked */
.services-form-modern select:invalid {
  color: #7a8694;
}

.services-form-modern select option {
  color: #1a2a3a;
  background: #fff;
}

.services-form-modern textarea {
  height: auto;
  min-height: 140px;
  resize: vertical;
}

.services-form-modern input:focus,
.services-form-modern select:focus,
.services-form-modern textarea:focus {
  border-color: #f5c842;
  background-color: #fff;
}

.services-form-modern button {
  width: 100%;
  margin: 6px 0 0;
  padding: 14px;
  background-color: #f5c842;
  color: #004c80;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: background-color .2s;
}

.services-form-modern button:hover {
  background-color: #e8b830;
}

/* "Need your fingerprints taken?" → booking app; shown only while the
   FBI service is selected (toggled by the [hidden] attribute in index.html) */
.services-form-modern .fbi-book-hint {
  margin: -2px 0 0;
  padding: 11px 14px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #ffffff;
  font: 400 .92rem/1.45 'Roboto', sans-serif;
}

.services-form-modern .fbi-book-hint a {
  color: #f5c842;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.services-form-modern .fbi-book-hint a:hover {
  color: #ffd95e;
}

.services-form-modern #form-status {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, .95);
}

@media (max-width: 768px) {
  .services-form-modern {
    width: 100%;
    padding: 24px 18px 28px;
  }

  .services-form-modern .services-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Custom dropdown (progressive enhancement)
   Replaces the oversized native <select> popup. The real
   <select> stays in the DOM (source of truth for submit +
   validation) and is only hidden once JS builds .bp-dd.
   ============================================================ */
.services-form-modern .bp-dd {
  position: relative;
  width: 100%;
}

/* Native select kept for form data/validation, visually hidden but
   still focusable (opacity, not display:none) so required validation
   can anchor its bubble to the field. */
.services-form-modern .bp-dd select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: none;
}

.services-form-modern .bp-dd-trigger {
  width: 100%;
  text-align: left;
  background-color: #f1f3f5;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  padding: 12px 38px 12px 14px;
  color: #1a2a3a;
  font: 400 .95rem 'Roboto', sans-serif;
  line-height: 1.4;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background-color .2s;
  box-sizing: border-box;
}

.services-form-modern .bp-dd-trigger.is-placeholder {
  color: #7a8694;
}

.services-form-modern .bp-dd-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a8694' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat center / 12px 12px;
  transition: transform .2s;
}

.services-form-modern .bp-dd.is-open .bp-dd-trigger {
  border-color: #f5c842;
  background-color: #fff;
}

.services-form-modern .bp-dd.is-open .bp-dd-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.services-form-modern .bp-dd-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e4e9;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.services-form-modern .bp-dd.is-open .bp-dd-menu {
  display: block;
}

.services-form-modern .bp-dd-option {
  padding: 9px 12px;
  border-radius: 6px;
  font: 400 .9rem 'Roboto', sans-serif;
  line-height: 1.35;
  color: #1a2a3a;
  cursor: pointer;
}

/* .is-focus = the option the arrow keys are on */
.services-form-modern .bp-dd-option:hover,
.services-form-modern .bp-dd-option.is-active,
.services-form-modern .bp-dd-option.is-focus {
  background-color: #f1f3f5;
}

.services-form-modern .bp-dd-option.is-active {
  font-weight: 600;
}

/* ============================================================
   Guides: the form sits centred at the end of the article
   (.services-form-container-center in css/main.css), under a
   centred heading. The card is the same width on every guide
   (500px, the full column on phones), whatever the heading's
   length, and its own text reads from the left.
   ============================================================ */
.services-form-container-center > #contact-us-blog:not(:empty) {
  width: 100%;
}

.services-form-container-center .services-form-modern {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

/* Phones and iPad portrait: css/main.css drops the 40px above and below the
   form there, so the card keeps some room before whatever follows it. */
@media (max-width: 768px) {
  .services-form-container-center .services-form-modern {
    margin-bottom: 30px;
  }
}
