/**
 * Multi-Step Form Styles for Lola Form Builder
 */

/* ==========================================================================
   Multi-Step Form Container
   ========================================================================== */

.lfb-multi-step-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.lfb-multi-step-form {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-top: 20px;
}

/* ==========================================================================
   Progress Indicators
   ========================================================================== */

.lfb-progress-container {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e1e5e9;
}

/* Step Indicator */
.lfb-step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-bottom: 20px;
}

.lfb-step-indicator::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e1e5e9;
  z-index: 1;
}

.lfb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  cursor: default;
  transition: all 0.3s ease;
}

.lfb-step.completed {
  cursor: pointer;
}

.lfb-step.completed:hover .step-number {
  transform: scale(1.1);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.step-title {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  max-width: 120px;
  line-height: 1.3;
  min-height: 2.6em; /* Reserve space for 2 lines of text */
}

/* Step States */
.lfb-step.pending .step-number {
  background: #e1e5e9;
  color: #6c757d;
  border: 2px solid #e1e5e9;
}

.lfb-step.pending .step-title {
  color: #6c757d;
}

.lfb-step.current .step-number {
  background: #007cba;
  color: white;
  border: 2px solid #007cba;
  box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.2);
}

.lfb-step.current .step-title {
  color: #007cba;
  font-weight: 600;
}

.lfb-step.completed .step-number {
  background: #28a745;
  color: white;
  border: 2px solid #28a745;
}

.lfb-step.completed .step-number::before {
  content: "✓";
  font-size: 18px;
}

.lfb-step.completed .step-title {
  color: #28a745;
}

/* Progress Bar */
.lfb-progress-bar-container {
  text-align: center;
}

.lfb-progress-bar {
  width: 100%;
  height: 8px;
  background: #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.lfb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007cba 0%, #0073aa 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.lfb-progress-text {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

/* Percentage Indicator */
.lfb-progress-percentage {
  text-align: center;
  padding: 20px;
}

.percentage-value {
  display: block;
  font-size: 48px;
  font-weight: 300;
  color: #007cba;
  line-height: 1;
  margin-bottom: 5px;
}

.percentage-label {
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Step Content
   ========================================================================== */

.lfb-step-content {
  min-height: 300px;
  margin-bottom: 30px;
}

.lfb-step-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.lfb-step-description {
  font-size: 16px;
  color: #666;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.5;
}

.lfb-step-fields {
  max-width: 600px;
  margin: 0 auto;
}

.lfb-no-fields {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 40px 20px;
}

/* ==========================================================================
   Form Fields in Steps
   ========================================================================== */

.lfb-step-fields .lfb-form-field {
  margin-bottom: 25px;
}

.lfb-step-fields .lfb-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.lfb-step-fields .lfb-field-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.4;
}

.lfb-step-fields input[type="text"],
.lfb-step-fields input[type="email"],
.lfb-step-fields input[type="tel"],
.lfb-step-fields input[type="url"],
.lfb-step-fields input[type="number"],
.lfb-step-fields input[type="date"],
.lfb-step-fields textarea,
.lfb-step-fields select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lfb-step-fields input:focus,
.lfb-step-fields textarea:focus,
.lfb-step-fields select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.lfb-step-fields textarea {
  min-height: 100px;
  resize: vertical;
}

/* Field Groups */
.lfb-radio-group,
.lfb-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lfb-radio-option,
.lfb-checkbox-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lfb-radio-option:hover,
.lfb-checkbox-option:hover {
  border-color: #007cba;
  background-color: rgba(0, 124, 186, 0.05);
}

.lfb-radio-option input,
.lfb-checkbox-option input {
  margin-right: 12px;
  transform: scale(1.2);
}

.lfb-radio-option label,
.lfb-checkbox-option label {
  flex: 1;
  cursor: pointer;
  margin: 0;
}

/* Field Validation */
.lfb-form-field.lfb-field-error input,
.lfb-form-field.lfb-field-error textarea,
.lfb-form-field.lfb-field-error select {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.lfb-field-error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
  display: flex;
  align-items: center;
}

.lfb-field-error-message::before {
  content: "⚠";
  margin-right: 5px;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.lfb-step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #e1e5e9;
}

.lfb-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.lfb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lfb-btn-previous {
  background: #6c757d;
  color: white;
}

.lfb-btn-previous:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
}

.lfb-btn-next,
.lfb-btn-submit {
  background: #007cba;
  color: white;
}

.lfb-btn-next:hover:not(:disabled),
.lfb-btn-submit:hover:not(:disabled) {
  background: #0073aa;
  transform: translateY(-1px);
}

.lfb-btn-submit {
  background: #28a745;
}

.lfb-btn-submit:hover:not(:disabled) {
  background: #218838;
}

/* ==========================================================================
   Form Messages
   ========================================================================== */

.lfb-form-messages {
  margin-bottom: 20px;
}

.lfb-form-message {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: 500;
}

.lfb-form-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.lfb-form-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .lfb-multi-step-wrapper {
    padding: 10px;
  }

  .lfb-multi-step-form {
    padding: 20px;
  }

  /* Step Indicator - Mobile */
  .lfb-step-indicator {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 20px;
    padding-bottom: 10px;
  }

  .lfb-step-indicator::before {
    display: none;
  }

  .lfb-step {
    flex-shrink: 0;
    min-width: 80px;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .step-title {
    font-size: 12px;
    max-width: 80px;
  }

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

  .lfb-step-description {
    font-size: 14px;
  }

  /* Navigation Buttons - Mobile */
  .lfb-step-navigation {
    flex-direction: column;
    gap: 15px;
  }

  .lfb-btn {
    width: 100%;
    min-width: auto;
  }

  /* Progress Percentage - Mobile */
  .percentage-value {
    font-size: 36px;
  }

  /* Form Fields - Mobile */
  .lfb-radio-group,
  .lfb-checkbox-group {
    gap: 8px;
  }

  .lfb-radio-option,
  .lfb-checkbox-option {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .lfb-multi-step-form {
    padding: 15px;
  }

  .lfb-step-title {
    font-size: 18px;
  }

  .lfb-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .lfb-progress-container,
  .lfb-step-navigation {
    display: none !important;
  }

  .lfb-multi-step-form {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}