/******************************
 * Custom CSS for Modern Contact Page
 * Targeted at EmailMeForm form structure
 ******************************/

/* Global Styles */
body {
  background-color: transparent; /* Set to transparent to blend with website */
  font-family: 'Lato', sans-serif;
  color: #333;
}

#emf-container-outer {
  padding: 20px;
  background-color: transparent; /* Ensure outer container is transparent */
}

#emf-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background-color: transparent; /* Set to transparent */
  border-radius: 12px;
  box-shadow: none; /* Remove shadow for seamless blend */
}

#emf-logo {
  text-align: center;
  margin-bottom: 30px;
}

#emf-logo a {
  font-size: 28px;
  font-weight: bold;
  color: #007bff;
  text-decoration: none;
}

.emf-error-message {
  color: #dc3545;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f8d7da;
  border-radius: 5px;
}

/* Form Styles */
#emf-form {
  font-size: 16px;
}

#emf-form ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#emf-form li {
  width: 100%;
  margin-bottom: 20px;
}

#emf-form li.emf-li-half-width {
  width: calc(50% - 10px);
}

#emf-form li.emf-li-field {
  position: relative;
}

label.emf-label-desc {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

.emf-label-desc span {
  color: #dc3545; /* Required asterisk color */
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 16px !important; /* Increased horizontal padding for less crammed look, !important to override */
  border: 1px solid #ced4da;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-size: 16px;
  box-sizing: border-box !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
  outline: none;
}

/* Checkbox and Radio Styles */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: #007bff; /* Modern checkbox color */
}

.one_column {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.padleft-w5 {
  font-size: 16px;
  color: #495057;
}

/* Name Field */
.emf-field-new_name .emf-div-field {
  display: flex;
  gap: 20px;
}

.emf-field-new_name span {
  flex: 1;
  width: auto !important;
}

.emf-bottom-label {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  margin-top: 4px;
}

/* Phone Field */
.emf-field-phone .emf-div-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.emf-field-phone .emf-div-field > span:nth-of-type(1),
.emf-field-phone .emf-div-field > span:nth-of-type(3) {
  flex: 3 1 auto;
}

.emf-field-phone .emf-div-field > span:nth-of-type(5) {
  flex: 4 1 auto;
}

.emf-field-phone .emf-div-field > span.emf-sep {
  flex: 0 0 auto;
}

.emf-field-phone .emf-div-field input {
  width: 100% !important;
  text-align: left; /* Align text to left for better look */
}

.emf-input-w30,
.emf-input-w40 {
  width: auto !important;
  text-align: center;
}

/* Date Field */
.emf-field-datetime .emf-div-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.emf-field-datetime-month,
.emf-field-datetime-day {
  flex: 1 1 auto !important;
}

.emf-field-datetime-year {
  flex: 2 1 auto !important;
}

.emf-field-datetime .emf-div-field > span.emf-sep {
  flex: 0 0 auto;
}

.emf-field-datetime .emf-div-field input[type="text"] {
  width: 100% !important;
  text-align: left;
}

.emf-field-datetime .emf-div-field > span:last-child {
  flex: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

.emf-input-w20 {
  text-align: center;
}

.emf-input-w40 {
  text-align: center;
}

/* Section Breaks */
.emf-field-section_break .emf-div-field-section {
  margin: 30px 0 20px;
}

.emf-section-separator {
  border: none;
  border-top: 1px solid #dee2e6;
  margin: 0;
}

h3 {
  font-size: 42px; /* Increased size for headers like "Contact Information" */
  color: #212529;
  margin-bottom: 0;
}

/* File Upload */
.emf-div-instruction {
  font-size: 14px;
  color: #6c757d;
  margin-top: 8px;
}

/* reCAPTCHA */
#emf-li-recaptcha {
  margin-bottom: 20px;
}

.g-recaptcha {
  transform: scale(1);
}

/* Submit Button */
#emf-li-post-button {
  text-align: center;
}

input[type="submit"] {
  background-color: #007bff; /* Changed to blue */
  color: white;
  padding: 16px 32px !important; /* Reduced padding for less spacious button */
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  min-width: 150px; /* Adjusted min-width to fit reduced padding */
}

input[type="submit"]:hover {
  background-color: #0056b3; /* Darker blue for hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

/* Other Option Fields */
.emf-allow-other input[type="text"] {
  margin-left: 28px;
  margin-top: 8px;
  width: calc(100% - 28px);
}

/* Clear Floats */
.emf-clear {
  clear: both;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  #emf-form li.emf-li-half-width {
    width: 100%;
  }

  #emf-container {
    padding: 20px;
  }

  .emf-field-new_name .emf-div-field {
    flex-direction: column;
    gap: 15px;
  }
}

/* ───────────────────────────────────────────────
   Expand & modernize field highlight background
─────────────────────────────────────────────── */
#emf-container #emf-form ul li.highlight-field {
    background-color: #f0f7ff;          /* very light blue tint – calm & professional */
    border-radius: 10px;
    padding: 16px 20px;                 /* this creates breathing room → makes highlight larger */
    margin: 0 -20px 20px -20px;         /* negative margins pull it to container edges */
    transition: background-color 0.25s ease, transform 0.15s ease;
}

/* Optional: subtle lift / shadow on highlight for depth */
#emf-container #emf-form ul li.highlight-field {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.08);
}

/* Make sure label stays readable & doesn't get squished */
#emf-container #emf-form ul li.highlight-field label.emf-label-desc {
    color: #0056b3;                     /* slightly darker blue to stand out */
    font-weight: 700;
}

/* Prevent double backgrounds – inputs stay white & crisp */
#emf-container div.emf-div-field {
    background-color: transparent !important;
}

/* Tighter integration with your existing focus ring */
#emf-container #emf-form ul li.highlight-field input:focus,
#emf-container #emf-form ul li.highlight-field textarea:focus,
#emf-container #emf-form ul li.highlight-field select:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.35);
}