/* HubSpot Multi-Step Form Styles */

/* Step Indicators (Circular Progress) */
.hs-step-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.hs-step-indicator {
  position: relative;
  z-index: 1;
}

.hs-step-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #9ca3af;
  border: 4px solid #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
}

/* Active step - green with pulse */
.hs-step-indicator.active .hs-step-circle {
  background: #10b981;
  border-color: #10b981;
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Completed step - keep green */
.hs-step-indicator.completed .hs-step-circle {
  background: #10b981;
  border-color: #10b981;
  animation: completeStep 0.4s ease;
}

@keyframes completeStep {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Connector dots between circles */
.hs-step-connector {
  flex: 1;
  height: 4px;
  background: repeating-linear-gradient(
    to right,
    #d1d5db 0px,
    #d1d5db 8px,
    transparent 8px,
    transparent 16px
  );
  max-width: 100px;
  margin: 0 8px;
  position: relative;
  overflow: hidden;
}

/* Completed connector with slide animation */
.hs-step-indicator.completed + .hs-step-connector {
  background: #d1d5db;
}

.hs-step-indicator.completed + .hs-step-connector::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #10b981;
  animation: fillConnector 0.4s ease forwards;
}

@keyframes fillConnector {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .hs-step-circle {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .hs-step-connector {
    max-width: 40px;
    margin: 0 4px;
  }
}

/* Stepper Container */
.hs-stepper-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Steps */
.hs-step {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateX(30px);
}

.hs-step.hidden {
  display: none;
}

.hs-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: slideInFade 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hs-step.sliding-back {
  animation: slideInFadeBack 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFadeBack {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Step Header */
.hs-step-header {
  margin-bottom: 30px;
}

.hs-step-title {
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 10px;
  text-align: center;
}

.hs-step-description {
  font-size: 14px;
  color: #e0e0e0;
  margin: 0;
}

/* Form Fields */
.hs-form {
  margin-bottom: 0;
}

.hs-field {
  margin-bottom: 12px;
  position: relative;
}

/* Field row for side-by-side layout */
.hs-field-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.hs-field-half {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .hs-field-row {
    flex-direction: column;
    gap: 0;
  }
  
  .hs-field-half {
    margin-bottom: 12px;
  }
}

.hs-field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.hs-field-label.required::after {
  content: ' *';
  color: #e7007e;
}

.hs-field-input,
.hs-field-select,
.hs-field-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  transition: border-color 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

/* Placeholder styling - subtle and accessible */
.hs-field-input::placeholder,
.hs-field-textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
  font-style: normal;
}

.hs-field-input:focus::placeholder,
.hs-field-textarea:focus::placeholder {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.hs-field-input:focus,
.hs-field-select:focus,
.hs-field-textarea:focus {
  outline: none;
  border-color: #e7007e;
  box-shadow: 0 0 0 3px rgba(231, 0, 126, 0.1);
}

.hs-field-textarea {
  min-height: 100px;
  resize: vertical;
}

.hs-field-select {
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Checkbox */
.hs-field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-field-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #e7007e;
}

.hs-field-checkbox label {
  cursor: pointer;
  font-size: 14px;
  margin: 0;
}

/* Error States */
.hs-error .hs-field-input,
.hs-error .hs-field-select,
.hs-error .hs-field-textarea {
  border-color: #dc2626;
}

.hs-error-msg {
  display: block;
  color: #dc2626;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.3;
}

/* Form Error Banner */
.hs-form-error {
  background: #fef2f2;
  border: 1px solid #dc2626;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: none;
}

/* Buttons */
.hs-form-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

.hs-btn {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hs-btn-back {
  background: #f5f5f5;
  color: #333;
}

.hs-btn-back:hover {
  background: #e0e0e0;
}

.hs-btn-next,
.hs-btn-submit {
  background: #e7007e;
  color: white;
  flex: 1;
}

.hs-btn-next:hover,
.hs-btn-submit:hover {
  background: #c5006b;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 0, 126, 0.3);
}

.hs-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Spinner */
.hs-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* Success Screen */
.hs-success-screen {
  text-align: center;
  padding: 60px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.hs-success-icon {
  width: 80px;
  height: 80px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 24px;
  animation: scaleIn 0.4s ease;
}

.hs-success-title {
  font-size: 48px;
  font-weight: 700;
  color: #14192d;
  margin: 0 0 8px;
  line-height: 1.2;
}

.hs-success-subtitle {
  font-size: 48px;
  font-weight: 700;
  color: #14192d;
  margin: 0 0 24px;
  line-height: 1.2;
}

.hs-success-message {
  font-size: 18px;
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hs-success-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hs-success-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.hs-success-btn-primary {
  background: #e7007e;
  color: white;
}

.hs-success-btn-primary:hover {
  background: #c5006b;
  transform: translateY(-1px);
}

.hs-success-btn-secondary,
.hs-success-btn-tertiary {
  background: #e5e7eb;
  color: #374151;
}

.hs-success-btn-secondary:hover,
.hs-success-btn-tertiary:hover {
  background: #d1d5db;
}

.hs-success-note {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Conditional Fields */
.hs-field-number-of-homes {
  display: none;
}

/* Meeting Confirmation (after booking in calendar) */
.hs-meeting-confirmation {
  background: white;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin: 20px 0;
}

.hs-meeting-confirmed-icon {
  width: 60px;
  height: 60px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.hs-meeting-confirmed-title {
  font-size: 24px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px;
}

.hs-meeting-confirmed-text {
  font-size: 16px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 16px;
}

.hs-meeting-confirmed-cta {
  font-size: 16px;
  font-weight: 600;
  color: #e7007e;
  margin: 0;
}

/* Calendar section with confirm button */
.hs-field-scheduling .hs-form-buttons {
  margin-top: -30px !important;
  padding-top: 10px;
  position: relative;
  z-index: 10;
}

.hs-field-scheduling .hs-btn-submit {
  width: 100%;
  margin: 0;
}

/* Free Access Toggle Section */
.hs-free-access-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 0 0 30px;
  line-height: 1.3;
}

.hs-free-access-toggle {
  text-align: center;
  margin: 30px 0;
}

.hs-toggle-label {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 20px;
}

.hs-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.hs-toggle-option {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.hs-toggle-switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 40px;
  cursor: pointer;
}

.hs-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.hs-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e0e0e0;
  transition: 0.3s;
  border-radius: 40px;
  border: 3px solid #14192d;
}

.hs-toggle-slider:before {
  position: absolute;
  content: "";
  height: 28px;
  width: 28px;
  right: 4px;
  bottom: 3px;
  background-color: #14192d;
  transition: 0.3s;
  border-radius: 50%;
}

.hs-toggle-switch input:checked + .hs-toggle-slider {
  background-color: #10b981;
  border-color: #10b981;
}

.hs-toggle-switch input:checked + .hs-toggle-slider:before {
  transform: translateX(-40px);
  background-color: #ffffff;
}

.hs-field-free-access .hs-field-description {
  text-align: center;
  font-size: 16px;
  color: #ffffff;
  margin-top: 20px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .hs-stepper-form {
    padding: 30px 15px;
  }

  .hs-step-title {
    font-size: 20px;
  }

  .hs-form-buttons {
    flex-direction: column;
  }

  .hs-btn {
    width: 100%;
  }

  .hs-btn-back {
    order: 2;
  }

  .hs-btn-next,
  .hs-btn-submit {
    order: 1;
  }
}

/* Accessibility */
.hs-field-input:focus-visible,
.hs-field-select:focus-visible,
.hs-field-textarea:focus-visible {
  outline: none;
  border-color: #e7007e;
  box-shadow: 0 0 0 3px rgba(231, 0, 126, 0.15);
}

.hs-btn:focus-visible {
  outline: 2px solid #14192d;
  outline-offset: 2px;
}

/* Helper Text */
.hs-field-description {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  line-height: 1.4;
}

/* Honeypot Field - Hidden from users, visible to bots */
.hs-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Animated Redirect Overlay */
.hs-redirect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.5s ease, background 0.5s ease;
  pointer-events: none;
}

.hs-redirect-overlay.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.98);
  pointer-events: all;
}

.hs-redirect-overlay.fade-out {
  background: rgba(255, 255, 255, 1);
}

.hs-redirect-content {
  text-align: center;
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hs-redirect-overlay.active .hs-redirect-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.hs-success-checkmark {
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
}

.hs-checkmark-circle {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: drawCircle 0.6s ease forwards;
}

.hs-checkmark-check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.4s ease forwards 0.6s;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.hs-redirect-title {
  font-size: 28px;
  font-weight: 700;
  color: #14192d;
  margin: 0 0 10px;
}

.hs-redirect-message {
  font-size: 16px;
  color: #666;
  margin: 0;
}
