/* Main container styles */
#optima_help {
  padding: 10px;
}

/* Header styles */
#optima_help h1 {
  font-size: 45px;
  line-height: 58px;
  color: #fff !important;
  font-weight: 700;
  font-family: Montserrat;
  text-align: center;
  margin-bottom: 20px;
}

/* Form subtitle */
#optima_help p.form-subtitle {
  font-size: 22px;
  line-height: 26px;
  color: #fff;
  font-family: 'Nunito Sans', Helvetica, Arial, Lucida, sans-serif;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}

/* General paragraph styles */
#optima_help p {
  color: #fff;
  font-size: 1em;
  font-family: 'Nunito Sans', Helvetica, Arial, Lucida, sans-serif;
}

/* Anchor hover effect */
#optima_help a:hover {
  text-decoration: underline;
}

/* DISCLOSURE Typography */
#optima_help #disclosure {
  -webkit-font-smoothing: antialiased;
  font-family: 'Nunito Sans', Helvetica, Arial, Lucida, sans-serif;
  font-weight: 700;
  line-height: 1.6em;
  margin: 1em 0;
  font-size: 16px;
}

#optima_help #disclosure a {
  color: #11ebb8 !important;
  text-decoration: underline;
  font-size: 16px;
  font-weight: bold;
}

/* CONSENTS (Fine Print) Typography */
#optima_help .policy h4 {
  font-size: 16px;
  text-align: left;
  color: #fff;
  margin: 23px 0 20px;
  padding: 0;
}

#optima_help .policy p {
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.7em;
  margin-top: 10px;
}

#optima_help .policy a {
  color: #11ebb8 !important;
}

/* THANK YOU PAGE Typography */
#optima_help #thank-you h1,
#optima_help #thank-you p {
  text-align: center;
}

#optima_help #thank-you h1 {
  font-size: 40px;
  margin: 55px 0 18px;
  color: #fff !important;
  font-weight: 700;
}

#optima_help #thank-you h2 {
  margin: 55px 0 18px;
  font-size: 36px;
  line-height: 44px;
  font-family: Montserrat;
  text-align: center;
  color: #fff !important;
  font-weight: 700;
}

#optima_help #thank-you p {
  font-size: 18px;
  line-height: 28px;
  padding-bottom: 15px;
}

#optima_help #thank-you a:link {
  font-size: 18px;
  line-height: 28px;
  padding-bottom: 15px;
  color: #fff !important;
  font-weight: bold;
}

/* Additional element color styling */
#optima_help #tax_debt {
  color: #666;
  background-color: #ffffff;
}

#optima_help #state {
  color: #333;
  background-color: #ffffff;
}

/* Select element styling */
#optima_help select {
  color: #333;
  padding: 16px 40px 16px 16px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
  appearance: none;
  border: 1px solid #dfdfdf;
  border-radius: 6px;
  overflow: hidden;
  background-color: #ffffff;
  font: 16px sans-serif;
  height: 55px;
  padding-left: 20px;
  background: url(/wp-content/uploads/2025/01/chevron-down.svg) no-repeat;
  background-position: calc(100% - 10px) center;
  background-size: 18px 18px;
}

/* Form container & box layout */
#optima_help .form-container {
  display: flex;
  justify-content: space-between;
}

#optima_help .form-box {
  flex: none;
}

/* Submit container positioning */
#optima_help #submit_container {
  height: 100px;
  position: relative;
}

/* Input fields styling */
#optima_help input[type='text'],
#optima_help input[type='email'] {
  border: 1px solid #dfdfdf;
  color: #333;
  font: 16px sans-serif;
  height: 55px;
  margin: 5px 0 1em;
  padding: 16px;
  width: 380px;
  border-radius: 6px;
}

/* Submit button styling for desktop */
#optima_help #submit_info {
  background-color: #08a681;
  border: none;
  border-radius: 40px;
  box-shadow: 0px 5px 18px -6px rgba(0, 0, 0, 0.3) !important;
  color: #fff !important;
  font-size: 18px;
  font-weight: 600;
  padding: 15px 35px !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#optima_help #submit_info:hover {
  cursor: pointer;
  background-color: #08a27a;
  color: #fff;
}

/* Dynamic elements and transitions */
#phone, #optima_help h1 {
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease-out;
  will-change: opacity, transform;
}

#phone.visible, #optima_help h1.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  line-height: 1.3em;
}

.page-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.90);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.15s ease-out;
  will-change: opacity;
  backdrop-filter: blur(5px);
}

.page-spinner.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0693e3;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  will-change: transform;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reset zoom and initial scale */
html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* DEVICE Styles */
/* Tablet portrait */
@media only screen and (min-width: 600px) and (max-width: 1020px) and (orientation: portrait) {
  .mfp-auto-cursor .mfp-content {
    width: 90%;
  }

  #optima_help #submit_info.form-box {
    width: 90%;
  }

  #optima_help input[type='text'],
  #optima_help input[type='email'] {
    width: 100%;
    max-width: none;
  }
}

/* Mobile styles */
@media screen and (max-width: 480px) {
  /* Reset any inherited zoom */
  html, body {
    zoom: 1 !important;
  }

  #optima_help {
    padding: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #optima_help .form-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
  }

  #optima_help input[type='text'],
  #optima_help input[type='email'],
  #optima_help select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 16px;
  }

  /* Ensure form elements don't overflow */
  .form-step {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Adjust header styles for mobile */
  #optima_help h1 {
    font-size: 38px;
    line-height: 42px;
    color: #36ddb6;
    margin-bottom: 30px;
  }

  #optima_help #thank-you h1 {
    font-size: 38px;
  }

  #optima_help p.form-subtitle {
    font-size: 18px !important;
    line-height: 28px !important;
  }

  #optima_help {
    padding: 15px;
  }

  #optima_help .form-container {
    margin-bottom: 15px;
  }

  #optima_help input[type='text'],
  #optima_help input[type='email'],
  #optima_help select {
    font-size: 16px; /* Prevent iOS zoom */
    height: 50px;
    padding: 12px;
  }

  #optima_help #submit_info {
    width: 100%;
    max-width: 300px;
    padding: 12px 24px !important;
    font-size: 16px;
  }

  #optima_help #disclosure {
    font-size: 14px;
    line-height: 1.4;
  }

  .page-spinner {
    background: rgba(255, 255, 255, 0.90);
  }

  .spinner {
    width: 32px;
    height: 32px;
    border-width: 2px;
  }
}

/* Fix width issues for screens up to 1020px */
@media only screen and (max-width: 1020px) {
  /* Stack form fields vertically */
  #optima_help .form-container {
    flex-direction: column;
    gap: 10px;
  }

  /* Full width for form boxes */
  #optima_help .form-box {
    width: 100% !important;
    margin-bottom: 10px;
  }

  /* Override fixed width on input fields */
  #optima_help input[type='text'],
  #optima_help input[type='email'] {
    width: 100% !important;
    max-width: none !important;
    margin: 5px 0;
  }

  #optima_help h1 {
    margin-top: 30px;
    margin-bottom: 0;
    font-size: 2.1em;
  }

  #optima_help .form-subtitle p {
    font-size: 18px;
  }

  #optima_help #submit_container {
    height: auto;
    padding: 20px 0;
  }

  #optima_help #submit_info {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    display: block;
    margin: 0 auto;
  }
}
