/* ============================================================
   ClearLane Lead Forms
   ============================================================ */

.cl-form-wrap {
  --cl-accent-start: #00D48A;
  --cl-accent-end: #00BCD4;
  --cl-input-focus-border: #00D48A;
  --cl-input-focus-shadow-color: rgba(0, 212, 138, 0.15);
  --cl-input-error-border: #F87171;
  --cl-input-error-shadow-color: rgba(248, 113, 113, 0.12);
  --cl-btn-hover-bg: #00C07B;
  --cl-btn-hover-text: #1A202C;
  --cl-btn-hover-border: #00C07B;
  --cl-success-min-height: 280px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1A202C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 32px;
  max-width: 680px;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  box-sizing: border-box;
  color: #F7FAFC;
  position: relative;
  overflow: hidden;
}

.cl-dso-combo {
  display: block;
  max-width: 680px;
  margin: 0 auto;
}

.cl-dso-combo--has-results {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
  max-width: none;
  --cl-results-height: calc(100vh - 2rem);
  --cl-dso-sticky-top: 24px;
}

.cl-dso-combo--has-results > .cl-dso-calculator-host,
.cl-dso-combo--has-results > .cl-dso-followup {
  min-width: 0;
}

.cl-dso-combo--has-results .cl-dso-followup .cl-form-wrap {
  max-width: none;
  width: 100%;
}

.cl-dso-followup {
  margin-top: 0;
  width: 100%;
  min-width: 0;
}

.cl-dso-followup[hidden] {
  display: none !important;
}

.cl-dso-combo--has-results .cl-dso-followup {
  position: sticky;
  top: var(--cl-dso-sticky-top, 24px);
  align-self: start;
  overflow-y: auto;
  padding-right: 4px;
  max-height: min(
    var(--cl-results-height, calc(100vh - 2rem)),
    calc(100vh - var(--cl-dso-sticky-top, 24px) - 1rem)
  );
}

.cl-dso-combo--has-results .cl-dso-followup::-webkit-scrollbar {
  width: 8px;
}

.cl-dso-combo--has-results .cl-dso-followup::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.cl-dso-combo--has-results .cl-dso-followup::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 560px) {
  .cl-dso-combo--has-results {
    grid-template-columns: 1fr;
  }

  .cl-dso-combo--has-results .cl-dso-followup {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

.cl-form-wrap * {
  box-sizing: border-box;
}

.cl-form-wrap::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cl-accent-start) 0%, var(--cl-accent-end) 100%);
}

.cl-form-wrap.cl-no-accent::before {
  display: none;
}

.cl-form-inner {
  display: flex;
  flex-direction: column;
}

.cl-form-heading {
  margin: 0 0 20px;
  color: #F7FAFC;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.cl-form-subheading {
  margin: 0 0 20px;
  color: #94A3B8;
  font-size: 14px;
  line-height: 1.5;
}

.cl-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.cl-field-row--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.cl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cl-label {
  margin: 0;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.cl-required {
  color: #F87171;
}

.cl-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #F7FAFC;
  font: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.cl-input::placeholder {
  color: #4A5568;
}

.cl-input:focus {
  border-color: var(--cl-input-focus-border);
  box-shadow: 0 0 0 3px var(--cl-input-focus-shadow-color);
}

.cl-input.cl-error {
  border-color: var(--cl-input-error-border);
  box-shadow: 0 0 0 3px var(--cl-input-error-shadow-color);
}

.cl-submit-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-actions {
  display: flex;
  justify-content: flex-start;
}

.cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 14px 24px;
  border: 0 solid transparent;
  border-radius: 10px;
  background: #00D48A;
  color: #1A202C;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  appearance: none;
  -webkit-appearance: none;
}

.cl-btn:hover,
.cl-btn:focus-visible {
  background: var(--cl-btn-hover-bg);
  color: var(--cl-btn-hover-text);
  border-color: var(--cl-btn-hover-border);
  outline: none;
}

.cl-btn:active {
  transform: scale(0.99);
}

.cl-btn:disabled,
.cl-btn.cl-loading {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.cl-btn.cl-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(0, 0, 0, 0.16);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: cl-spin 0.65s linear infinite;
}

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

.cl-message {
  min-height: 0;
  margin: 0;
  color: #F87171;
  font-size: 13px;
  line-height: 1.5;
}

.cl-message:empty {
  display: none;
}

.cl-message.cl-error-msg {
  display: block;
  padding: 10px 14px;
  border: 1px solid rgba(248, 113, 113, 0.15);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.06);
}

.cl-success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0 8px;
  text-align: center;
}

.cl-form-wrap.cl-submitted .cl-form {
  display: none;
}

.cl-form-wrap.cl-submitted .cl-form-heading,
.cl-form-wrap.cl-submitted .cl-form-subheading {
  display: none;
}

.cl-form-wrap.cl-submitted .cl-form-inner {
  min-height: var(--cl-success-min-height);
  justify-content: center;
}

.cl-form-wrap.cl-submitted .cl-success-screen {
  display: flex;
  flex: 1;
  justify-content: center;
  padding: 0;
}

.cl-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0, 212, 138, 0.2);
  border-radius: 50%;
  background: rgba(0, 212, 138, 0.08);
}

.cl-success-icon svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: #00D48A;
}

.cl-success-title {
  margin: 0;
  color: #F7FAFC;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.cl-success-text {
  margin: 0;
  color: #94A3B8;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .cl-dso-combo {
    grid-template-columns: 1fr;
  }

  .cl-dso-followup {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .cl-form-wrap {
    --cl-success-min-height: 220px;
    padding: 24px;
  }

  .cl-field-row--two {
    grid-template-columns: 1fr;
  }
}
