/* ========================================================================== 
   EMAILMEFORM — MODERN TRIAL LESSON FORM
   Designed to match the supplied reference image.

   IMPORTANT
   1) Keep the field order as:
      Full Name, Email, Phone, Student Age, Instrument, Message.
   2) Set the submit-button text inside EmailMeForm to:
      Request a trial lesson
   3) The first field and the textarea automatically span both columns.
   ========================================================================== */

/* ---------- Base / canvas ---------- */
html,
body#emf-container-wrap,
body.form {
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

body#emf-container-wrap {
  padding: 15px !important;
  color: #17191d;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#emf-container,
#emf-container * {
  box-sizing: border-box;
}

/* ---------- Outer wrapper and card ---------- */
#emf-container-outer {
  width: 100% !important;
  max-width: 494px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#emf-container {
  width: 100% !important;
  max-width: 494px !important;
  margin: 0 auto !important;
  padding: 35px 33px 34px !important;
  overflow: visible !important;
  background: #f8fafc !important;
  border: 1px solid #e1e5ea !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.035) !important;
}

/* Hide the standard EMF header elements to match the reference */
#emf-container #emf-logo,
#emf-container #emf-form-instruction,
#emf-container #emf-page-info,
#emf-container .emf-head-widget,
#emf-container-outer #emf-form-shadows {
  display: none !important;
}

#emf-container #emf-form {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* ---------- Two-column form layout ---------- */
#emf-container #emf-form > ul {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: 14px !important;
  row-gap: 30px !important;
  width: 100% !important;
  margin: 0 0 36px !important;
  padding: 0 !important;
  list-style: none !important;
}

#emf-container #emf-form > ul > li {
  position: relative !important;
  display: block !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

/* Full Name and Message span the complete width */
#emf-container #emf-form > ul > li:first-child,
#emf-container #emf-form > ul > li.emf-field-textarea,
#emf-container #emf-form > ul > li.emf-field-section_break,
#emf-container #emf-form > ul > li.emf-field-page_break {
  grid-column: 1 / -1 !important;
}

#emf-container #emf-form > ul > li.emf-hide,
#emf-container #emf-form > ul > li.emf-field-hidden {
  display: none !important;
}

#emf-container .emf-clear {
  display: none !important;
}

/* ---------- Labels ---------- */
#emf-container label.emf-label-desc {
  display: block !important;
  width: auto !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  color: #17191d !important;
  background: transparent !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
  letter-spacing: 1.15px !important;
  text-transform: uppercase !important;
}

/* Required marker generated by EmailMeForm */
#emf-container .emf-required,
#emf-container .required,
#emf-container label.emf-label-desc abbr {
  color: #f05a28 !important;
  text-decoration: none !important;
}

/* Add a required marker when the field uses EMF's validate[required] class */
@supports selector(li:has(input)) {
  #emf-container li:has(.validate[class*="required"]) > label.emf-label-desc::after {
    content: " *";
    color: #f05a28;
  }
}

/* Match the small “optional” text shown beside MESSAGE */
#emf-container li.emf-field-textarea > label.emf-label-desc::after {
  content: "  optional";
  color: #70747b;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Field wrappers ---------- */
#emf-container .emf-div-field {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- Inputs, select and textarea ---------- */
#emf-container div.emf-div-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]),
#emf-container div.emf-div-field select,
#emf-container div.emf-div-field textarea {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  color: #55585e !important;
  background-color: #ffffff !important;
  border: 1px solid #ddd9d5 !important;
  border-radius: 9px !important;
  outline: 0 !important;
  box-shadow: none !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 11.5px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#emf-container div.emf-div-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]),
#emf-container div.emf-div-field select {
  height: 38px !important;
  padding: 0 12px !important;
}

#emf-container div.emf-div-field textarea {
  min-height: 89px !important;
  height: 89px !important;
  padding: 11px 12px !important;
  resize: vertical !important;
}

#emf-container div.emf-div-field select {
  padding-right: 42px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.25 5.25L7 9L10.75 5.25' stroke='%2317191D' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 14px 14px !important;
}

#emf-container div.emf-div-field input::placeholder,
#emf-container div.emf-div-field textarea::placeholder {
  color: #b7b8bc !important;
  opacity: 1 !important;
}

#emf-container div.emf-div-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
#emf-container div.emf-div-field select:focus,
#emf-container div.emf-div-field textarea:focus {
  border-color: #8eb3ef !important;
  box-shadow: 0 0 0 3px rgba(18, 94, 224, 0.09) !important;
  background-color: #ffffff !important;
}

/* Remove old EMF focus/highlight backgrounds */
#emf-container #emf-form ul li.highlight-field {
  background: transparent !important;
}

/* ---------- Field instructions ---------- */
#emf-container li .emf-div-instruction,
#emf-container li .emf-div-field label:not(.emf-label-desc) {
  display: block !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
  color: #777b82 !important;
  background: transparent !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}


/* ---------- Submit container only ----------
   The form uses a two-column CSS grid. Without this exception, the list item
   containing the submit/image button is trapped in the left grid column.
   These rules affect only its parent container, never the button itself. */
@supports selector(li:has(input)) {
  #emf-container #emf-form > ul > li:has(#submit_form),
  #emf-container #emf-form > ul > li:has(input[type="submit"]),
  #emf-container #emf-form > ul > li:has(input[type="image"]),
  #emf-container #emf-form > ul > li:has(button[type="submit"]) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* Submit controls are intentionally not styled here.
   This includes input[type="submit"], button elements, and uploaded
   image buttons rendered as input[type="image"]. Their size, position,
   image, and appearance remain controlled by EmailMeForm. */

/* ---------- Errors ---------- */
#emf-container .emf-error-message {
  margin: 0 0 22px !important;
  padding: 10px 12px !important;
  color: #9f1d1d !important;
  background: #fff4f4 !important;
  border: 1px solid #f0b9b9 !important;
  border-radius: 8px !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  body#emf-container-wrap {
    padding: 10px !important;
  }

  #emf-container {
    padding: 28px 22px 30px !important;
    border-radius: 14px !important;
  }

  #emf-container #emf-form > ul {
    grid-template-columns: 1fr !important;
    row-gap: 24px !important;
    margin-bottom: 30px !important;
  }

  #emf-container #emf-form > ul > li,
  #emf-container #emf-form > ul > li:first-child,
  #emf-container #emf-form > ul > li.emf-field-textarea {
    grid-column: 1 !important;
  }
}
