/**
 * SEON HubSpot Form Styles
 * Standalone CSS extracted from the original SCSS
 */

.seon-hubspot-form {
  width: 100%;
  background-color: transparent;
  border-radius: 10px;
  z-index: 1;
}

.seon-hubspot-form form {
  width: 100%;
  height: 100%;
}

@media only screen and (min-width: 768px) {
  .seon-hubspot-form form {
    padding: 45px 0 30px 30px;
  }
}

.seon-hubspot-form form.withoutPadding {
  padding: 0 !important;
}

.seon-hubspot-form fieldset {
  margin: auto;
}

/* Label styling */
.seon-hubspot-form label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 0.875rem;
  line-height: 100%;
  color: #6b7280;
  position: absolute;
  z-index: 2;
  left: 0;
  top: -6px;
  transition: all 0.3s;
}

.seon-hubspot-form label.hs-error-msg,
.seon-hubspot-form label.hs-main-font-element {
  opacity: 1;
  color: red;
  position: static;
}

.seon-hubspot-form label.up {
  top: -15px;
  font-size: 0.625rem;
}

.seon-hubspot-form label > a {
  display: none;
}

/* Field containers */
.seon-hubspot-form .hs-form-field,
.seon-hubspot-form .legal-consent-container {
  margin-bottom: 40px;
  position: relative;
}

/* Input and textarea styling */
.seon-hubspot-form input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.seon-hubspot-form textarea {
  background-color: transparent;
  display: block;
  position: relative;
  width: 100% !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 0.875rem;
  line-height: 100%;
  color: #1e3a8a;
  resize: none;
  transition: border-color 0.2s linear;
  border: none;
  border-bottom: 1px solid #d1d5db;
  overflow: visible;
  padding: 10px 0;
}

.seon-hubspot-form textarea {
  height: 85px;
}

.seon-hubspot-form input::placeholder,
.seon-hubspot-form textarea::placeholder {
  color: transparent;
}

.seon-hubspot-form input:placeholder-shown,
.seon-hubspot-form textarea:placeholder-shown {
  border-bottom: 1px solid #d1d5db;
}

.seon-hubspot-form input:focus,
.seon-hubspot-form textarea:focus {
  outline: none;
  border-bottom: 1px solid #1e3a8a;
  border-radius: 2px;
}

/* Select dropdown styling */
.seon-hubspot-form .hs-fieldtype-select label {
  display: none;
}

.seon-hubspot-form .hs-fieldtype-select select {
  width: 100%;
  cursor: pointer;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 0.875rem;
  line-height: 1rem;
  color: #6b7280;
  appearance: none;
  padding-bottom: 10px;
  border: none;
  border-bottom: 1px solid #d1d5db;
  border-radius: 2px;
  background-color: transparent;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M5 7.5L10 12.5L15 7.5" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 10px center;
}

.seon-hubspot-form .hs-fieldtype-select select:focus {
  outline: none;
  border-bottom: 1px solid #1e3a8a;
}

.seon-hubspot-form .hs-fieldtype-select option {
  width: 100%;
  cursor: pointer;
}

/* Checkbox styling */
.seon-hubspot-form .hs-fieldtype-checkbox,
.seon-hubspot-form .hs-fieldtype-booleancheckbox {
  display: flex;
  flex-direction: column;
}

.seon-hubspot-form .hs-fieldtype-checkbox label,
.seon-hubspot-form .hs-fieldtype-booleancheckbox label {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.seon-hubspot-form .hs-fieldtype-checkbox input[type="checkbox"],
.seon-hubspot-form .hs-fieldtype-booleancheckbox input[type="checkbox"] {
  width: 20px !important;
  height: 20px;
  border: none;
  margin: 10px 10px 10px 0;
  position: relative;
  appearance: none;
  cursor: pointer;
}

.seon-hubspot-form .hs-fieldtype-checkbox input[type="checkbox"]::before,
.seon-hubspot-form .hs-fieldtype-booleancheckbox input[type="checkbox"]::before {
  display: block;
  content: '';
  cursor: pointer;
  width: 20px;
  height: 20px;
  border: 2px solid #1e3a8a;
  background-color: white;
  border-radius: 4px;
}

.seon-hubspot-form .hs-fieldtype-checkbox input[type="checkbox"]:checked::before,
.seon-hubspot-form .hs-fieldtype-booleancheckbox input[type="checkbox"]:checked::before {
  background: #bfdbfe url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10" fill="none"><path d="M1 5L4.5 8.5L11 1.5" stroke="%231e3a8a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center no-repeat;
}

/* Radio button styling */
.seon-hubspot-form .hs-fieldtype-radio {
  display: flex;
  flex-direction: column;
}

.seon-hubspot-form .hs-fieldtype-radio label {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.seon-hubspot-form .hs-fieldtype-radio input[type="radio"] {
  width: 20px !important;
  height: 20px;
  border: none;
  margin: 10px 10px 10px 0;
  position: relative;
  appearance: none;
  cursor: pointer;
}

.seon-hubspot-form .hs-fieldtype-radio label::before {
  content: '';
  cursor: pointer;
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 14px;
  position: absolute;
  left: 0;
  border: 2px solid #1e3a8a;
  background-color: white;
  border-radius: 50%;
  z-index: 1;
}

.seon-hubspot-form .hs-fieldtype-radio input[type="radio"]:checked ~ span::after {
  content: '';
  cursor: pointer;
  display: block;
  position: absolute;
  text-align: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #1e3a8a;
  top: 11px;
  left: 7px;
  z-index: 100;
}

.seon-hubspot-form .hs-fieldtype-radio input[type="radio"]:checked ~ span::before {
  content: '';
  cursor: pointer;
  display: block;
  position: absolute;
  text-align: center;
  width: 20.5px;
  height: 20.5px;
  border-radius: 50%;
  background-color: #bfdbfe;
  top: 6px;
  left: 2px;
  z-index: 10;
}

/* Submit button styling */
.seon-hubspot-form .hs-submit input[type="submit"] {
  margin: auto;
  width: 173px !important;
  height: 45px;
  border: 2px solid #f97316;
  border-radius: 4px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 1rem;
  line-height: 100%;
  text-align: center;
  color: #f97316;
  background-color: transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.seon-hubspot-form .hs-submit input[type="submit"]:hover {
  border-color: #ea580c;
  color: white;
  background-color: #ea580c;
}

.seon-hubspot-form .hs-submit input[type="submit"].primary {
  color: white;
  background-color: #f97316;
  border-color: #f97316;
}

.seon-hubspot-form .hs-submit input[type="submit"].primary:hover {
  background-color: #ea580c;
  border-color: #ea580c;
}

.seon-hubspot-form .hs-submit input[type="submit"].fullWidth {
  width: 100% !important;
}

/* Rich text styling */
.seon-hubspot-form .hs-richtext {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: #6b7280;
}

.seon-hubspot-form .hs-richtext a {
  text-decoration: none;
  color: #f97316;
}

.seon-hubspot-form .hs-richtext a:hover {
  text-decoration: underline;
}

/* Hide HubSpot branding */
.seon-hubspot-form .hubspot-link__container,
.seon-hubspot-form .hs-form-booleancheckbox-display {
  display: none;
}

/* List reset */
.seon-hubspot-form li {
  list-style-type: none;
}

/* Two-column layout for fieldsets */
.seon-hubspot-form fieldset.form-columns-2 {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.seon-hubspot-form fieldset.form-columns-2 .hs-form-field {
  width: calc(50% - 10px);
}

@media (max-width: 768px) {
  .seon-hubspot-form fieldset.form-columns-2 .hs-form-field {
    width: 100%;
  }
}

/* Error message styling */
.seon-hubspot-form .hs-error-msgs {
  margin-top: 5px;
}

.seon-hubspot-form .hs-error-msg {
  color: #ef4444;
  font-size: 0.75rem;
  display: block;
  margin-top: 5px;
}

/* Loading state */
.seon-hubspot-form.loading::after {
  content: 'Loading form...';
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
}
