/* ==================================
   ENQUIRY FORM (.mef)
   The custom form that replaced the Jotform embeds on free_case_evaluation.html
   and contact.html. Posts to /enquiry.php, which mails info@metroindiadetective.com
   through the cPanel mailbox. Behaviour: crafto/js/metro-form.js.
   Palette: #ee3939 red / #171717 ink / #ffffff white / #e5e5e5 line only.
================================== */

.mef {
  --mef-red: #ee3939;
  --mef-ink: #171717;
  --mef-text: #444444;
  --mef-line: #e5e5e5;
  --mef-field: #ffffff;
  --mef-soft: #f6f6f6;

  width: 100%;
  color: var(--mef-text);
  font-family: inherit;
}

.mef *,
.mef *::before,
.mef *::after {
  box-sizing: border-box;
}

/* ---------- shell ---------- */
.mef-card {
  position: relative;
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid var(--mef-line);
  border-top: 3px solid var(--mef-red);
  background: var(--mef-field);
  box-shadow: 0 12px 34px rgb(0 0 0 / 6%);
}

.mef-head {
  margin: 0 0 20px;
}

.mef-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: var(--mef-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mef-title {
  margin: 0 0 8px;
  color: var(--mef-ink);
  font-family: var(--alt-font, inherit);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.25;
}

.mef-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- fields ---------- */
.mef-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mef-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mef-field-wide {
  grid-column: 1 / -1;
}

.mef-label {
  margin: 0 0 6px;
  color: var(--mef-ink);
  font-size: 13px;
  font-weight: 600;
}

.mef-label .mef-req {
  color: var(--mef-red);
}

.mef-label .mef-opt {
  color: #999999;
  font-weight: 400;
}

.mef-input,
.mef-select,
.mef-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--mef-line);
  border-radius: 2px;
  background: var(--mef-field);
  color: var(--mef-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mef-textarea {
  min-height: 132px;
  resize: vertical;
}

.mef-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
  appearance: none;
}

.mef-input:hover,
.mef-select:hover,
.mef-textarea:hover {
  border-color: #c9c9c9;
}

.mef-input:focus,
.mef-select:focus,
.mef-textarea:focus {
  border-color: var(--mef-red);
  box-shadow: 0 0 0 3px rgb(238 57 57 / 14%);
  outline: none;
}

.mef-input::placeholder,
.mef-textarea::placeholder {
  color: #a5a5a5;
}

/* the honeypot: off screen for people, still fillable for a bot */
.mef-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ---------- consent ---------- */
.mef-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.55;
}

.mef-consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--mef-red);
}

.mef-consent a {
  color: var(--mef-ink);
  text-decoration: underline;
}

.mef-consent a:hover {
  color: var(--mef-red);
}

/* ---------- errors ---------- */
.mef-error {
  display: none;
  margin: 6px 0 0;
  color: var(--mef-red);
  font-size: 12.5px;
  line-height: 1.45;
}

.mef-field.is-invalid .mef-error,
.mef-consent-field.is-invalid .mef-error {
  display: block;
}

.mef-field.is-invalid .mef-input,
.mef-field.is-invalid .mef-select,
.mef-field.is-invalid .mef-textarea {
  border-color: var(--mef-red);
  background: #fff8f8;
}

.mef-alert {
  margin: 0 0 18px;
  padding: 12px 15px;
  border-left: 3px solid var(--mef-red);
  background: #fff3f3;
  color: #a61f1f;
  font-size: 14px;
  line-height: 1.55;
}

.mef-alert[hidden] {
  display: none;
}

/* ---------- actions ---------- */
.mef-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  margin-top: 22px;
}

.mef-submit {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 14px 30px;
  border: 0;
  border-radius: 2px;
  background: var(--mef-red);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.mef-submit:hover {
  background: #d32b2b;
  transform: translateY(-2px);
}

.mef-submit:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.mef-submit svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mef-spin {
  width: 15px;
  height: 15px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mef-spin 0.7s linear infinite;
}

@keyframes mef-spin {
  to {
    transform: rotate(360deg);
  }
}

.mef-note {
  flex: 1 1 190px;
  min-width: 0;
  color: #777777;
  font-size: 12.5px;
  line-height: 1.5;
}

.mef-note svg {
  width: 13px;
  height: 13px;
  margin-right: 5px;
  vertical-align: -2px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
}

/* ---------- success ---------- */
.mef-done {
  padding: clamp(28px, 3.4vw, 46px) clamp(22px, 2.6vw, 34px);
  text-align: center;
}

.mef-done-ico {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--mef-red);
  place-items: center;
}

.mef-done-ico svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mef-done h3 {
  margin: 0 0 10px;
  color: var(--mef-ink);
  font-family: var(--alt-font, inherit);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
}

.mef-done p {
  max-width: 440px;
  margin: 0 auto 6px;
  font-size: 14.5px;
  line-height: 1.65;
}

.mef-done-call {
  display: inline-block;
  margin-top: 14px;
  color: var(--mef-red);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.mef-done-call:hover {
  text-decoration: underline;
}

/* ---------- narrow screens ---------- */
@media (max-width: 767px) {
  .mef-grid {
    grid-template-columns: 1fr;
  }

  .mef-card {
    padding: 22px 18px;
  }

  .mef-submit {
    justify-content: center;
    width: 100%;
  }
}

/* the form sits beside the picture on the free case evaluation page */
.contact-enquiry1 .mef {
  height: 100%;
}

/* contact.html: the form block under the locations panel */
.moc-form {
  max-width: 760px;
  margin: 40px auto 0;
}

/* free_case_evaluation.html: the picture beside the form was a file that no longer
   existed; it now matches the height of the form card next to it. */
.case .row > .col-md-6 > .img-fluid {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}
