/* LLC Formation Form Styling - Enhanced */
.formation-form {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Poppins', 'Roboto', sans-serif;
  color: #333;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Step styles with improved transitions */
.form-step {
  padding: 20px 0;
  transition: all 0.4s ease-in-out;
  opacity: 1;
  position: relative;
}

/* Ensure first step is visible */
#step-1 {
  display: block !important;
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 35px;
  text-align: center;
  position: relative;
}

.step-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #008036;
  border-radius: 3px;
}

/* Service type selection - Step 1 */
.service-type-options {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}

.service-option {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 30px 25px;
  width: 240px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.service-option:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: transparent;
  transition: all 0.3s ease;
}

.service-option:hover {
  border-color: #008036;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-option:hover:before {
  background-color: #008036;
}

.service-option.selected {
  border-color: #008036;
  background-color: rgba(0, 128, 54, 0.05);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-option.selected:before {
  background-color: #008036;
}

.service-icon {
  font-size: 42px;
  color: #008036;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.service-option:hover .service-icon,
.service-option.selected .service-icon {
  transform: scale(1.1);
}

.service-label {
  font-weight: 600;
  font-size: 18px;
  transition: all 0.3s ease;
  color: #2c3e50;
}

.service-option input[type="radio"] {
  display: none;
}
  
/* Form controls */
.form-group {
  margin-bottom: 20px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 15px;
  font-size: 16px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select.form-control {
  height: 45px;
}

textarea.form-control {
  resize: vertical;
}

label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 500;
}

/* Form notes */
.form-note {
  background-color: #f8f9fa;
  border-left: 4px solid #17a2b8;
  padding: 10px 15px;
  margin: 15px 0;
  font-size: 14px;
  color: #6c757d;
}

.form-note i {
  color: #17a2b8;
  margin-right: 5px;
}

/* Navigation buttons */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: #008036;
  border-color: #008036;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-success {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

/* Package styling - Step 9 */
.package-header {
  text-align: center;
  margin-bottom: 30px;
}

.package-icon {
  font-size: 36px;
  color: #008036;
  margin-bottom: 15px;
}

.main-package {
  background-color: #f8f9fa;
  border: 2px solid #008036;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
}

.package-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #008036;
}

.package-subtitle {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 15px;
}

.package-features {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 15px;
}

.package-features li {
  padding: 5px 0;
  padding-left: 25px;
  position: relative;
}

.package-features li:before {
  content: "✓";
  color: #28a745;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.package-price {
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  color: #2c3e50;
}

/* Add-on packages */
.addon-packages {
  margin-top: 30px;
}

.addon-packages h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.addon-package {
  display: flex;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.addon-package:hover {
  border-color: #6c757d;
  background-color: rgba(0, 0, 0, 0.01);
}

.addon-package.selected {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.05);
}

.addon-check {
  padding-right: 15px;
  display: flex;
  align-items: center;
}

.addon-checkbox {
  width: 20px;
  height: 20px;
}

.addon-details {
  flex-grow: 1;
}

.addon-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #2c3e50;
}

.addon-subtitle {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 10px;
}

.addon-features {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 10px;
}

.addon-features li {
  padding: 3px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
}

.addon-features li:before {
  content: "•";
  color: #17a2b8;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.addon-price {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  color: #2c3e50;
}

/* Form summary */
.form-summary {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px 20px;
  margin-top: 30px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
}

/* Company type selection - Step 3 */
.company-type-option {
  background-color: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 25px 20px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.company-type-option:hover {
  border-color: #008036;
}

.company-type-option.selected {
  border-color: #008036;
  background-color: rgba(0, 123, 255, 0.05);
}

.company-type-icon {
  font-size: 36px;
  color: #008036;
  margin-bottom: 15px;
}

.company-type-label {
  font-weight: 600;
  font-size: 16px;
}

.company-type-option input[type="radio"] {
  display: none;
}

/* Form checks (radio buttons and checkboxes) */
.form-check {
  position: relative;
  display: block;
  padding-left: 1.25rem;
  margin-bottom: 10px;
}

.form-check-input {
  position: absolute;
  margin-top: .3rem;
  margin-left: -1.25rem;
}

.form-check-label {
  margin-bottom: 0;
}

/* Scroll indicator styles */
.scroll-indicator {
  display: none;
  flex-direction: column;
  align-items: center;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #008036;
  animation: fadeInUp 0.8s ease;
  z-index: 10;
}

.scroll-arrow {
  font-size: 24px;
  margin-bottom: 5px;
}

.scroll-text {
  font-size: 14px;
  font-weight: 600;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Error message styles */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive adjustments with improved mobile button placement */
@media (max-width: 768px) {
  .formation-form {
    padding: 20px 15px;
  }
  
  .service-type-options {
    flex-direction: column;
    align-items: center;
  }
  
  .service-option {
    width: 100%;
    max-width: 300px;
  }
  
  /* Reverse the button order for mobile - primary action on top */
  .form-navigation {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    margin-top: 30px;
  }
  
  /* Make buttons take full width on mobile */
  .form-navigation button {
    width: 100%;
    margin: 0;
    padding: 12px 20px; /* Slightly larger touch targets */
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 15px; /* Larger touch target */
  }
  
  /* Improve addon package layout on mobile */
  .addon-package {
    position: relative;
    padding: 20px;
  }
  
  .addon-check {
    position: absolute;
    top: 20px;
    right: 20px;
  }
  
  .addon-checkbox {
    width: 22px;
    height: 22px;
  }
  
  .addon-details {
    padding-right: 30px;
  }
  
  /* Make sure selected states are more visible on mobile */
  .service-option.selected,
  .company-type-option.selected,
  .addon-package.selected {
    border-width: 3px;
    box-shadow: 0 5px 15px rgba(0, 128, 54, 0.15);
  }
  
  /* Better spacing for error messages */
  .field-error {
    font-size: 13px;
    padding: 5px 0;
  }
  
  /* Make the scroll indicator more visible on mobile */
  .scroll-indicator {
    bottom: 10px;
  }
  
  .scroll-arrow {
    font-size: 28px;
  }
  
  /* Enhancement for order summary on mobile */
  .order-summary {
    padding: 15px;
  }
  
  .summary-item {
    flex-direction: column;
  }
  
  .summary-item-price {
    align-self: flex-end;
    margin-top: 10px;
  }
  
  
  /* Style primary action buttons to stand out more */
  .form-navigation .next-step,
  .form-navigation .submit-form,
  .form-navigation .checkout-button {
    order: 1;
    background-color: #008036;
    border-color: #008036;
    box-shadow: 0 4px 8px rgba(0, 128, 54, 0.2);
    font-weight: 600;
  }
  
  /* Style secondary buttons */
  .form-navigation .prev-step {
    order: 2;
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
  }
  
  /* Add some space between steps for better readability */
  .form-step {
    padding-bottom: 40px;
  }
  
  /* Make sure form inputs are easily tappable */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 15px; /* Larger touch target */
    height: auto; /* Ensure consistent height */
    line-height: 1.5;
    border-radius: 4px;
  }

  /* Improve field focus states on mobile */
  input:focus,
  select:focus,
  textarea:focus {
    border-color: #008036;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 128, 54, 0.2);
  }

  /* Ensure dropdowns are easily tappable */
  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23495057' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
  }
}

/* Mobile button layout - showing primary buttons first (on top) */
.form-navigation {
  flex-direction: column;
  gap: 10px;
}

.form-navigation .next-step,
.form-navigation .submit-form,
.form-navigation .checkout-button {
  order: -1;
}

.form-navigation .prev-step {
  order: 1;
  margin-top: 5px;
}