/* ================================================== */
/* Consultation Modal - Multi-Step Form */
/* ================================================== */

/* Modal Overlay with Blur */
.consultation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.consultation-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.consultation-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.consultation-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
  
/* Modal Header */
.modal-header {
  padding: 25px 25px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  flex-shrink: 0;
}

.modal-header h3 {
  color: #ffffff;
  font-size: 24px;
  margin: 0;
  font-weight: 600;
}

.modal-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 8px 0 0;
}

.modal-close {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.3s ease;
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover::before,
.modal-close:hover::after {
  background: var(--primary-color);
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.step:last-child::after {
  display: none;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.2);
}

.step.completed .step-number {
  background: rgba(var(--primary-color-rgb), 0.3);
  color: var(--primary-color);
}

.step-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.step.active .step-label {
  color: var(--primary-color);
}

/* Modal Body */
.modal-body {
  padding: 22px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  max-height: calc(85vh - 280px);
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeInStep 0.4s ease-out;
}

.form-step.active {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--primary-color);
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  font-family: var(--body-font);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  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='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: #1B1663;
  color: #ffffff;
}

/* Service Options Grid */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.service-option {
  position: relative;
}

.service-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-option label {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0;
  font-size: 14px;
}

.service-option input[type="radio"]:checked + label {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: var(--primary-color);
}

.service-option label::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.service-option input[type="radio"]:checked + label::before {
  border-color: var(--primary-color);
  background: var(--primary-color);
  box-shadow: inset 0 0 0 3px #000000;
}

.service-option label:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Summary Section */
.summary-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-bottom: 4px;
}

.summary-value {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
}

/* Modal Footer */
.modal-footer {
  padding: 18px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-shrink: 0;
  background: #000000;
}

.btn-modal {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: var(--body-font);
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-next,
.btn-submit {
  background: var(--primary-color);
  color: #ffffff;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.btn-next:hover,
.btn-submit:hover {
  background: rgba(var(--primary-color-rgb), 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(var(--primary-color-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-icon i {
  font-size: 32px;
  color: var(--primary-color);
}

.success-message h4 {
  color: #ffffff;
  margin-bottom: 12px;
}

.success-message p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

/* Error Message */
.error-message {
  color: #ff4444;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #ff4444;
}

.form-group.error .error-message {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 576px) {
  .consultation-modal {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 18px 20px 14px;
  }

  .modal-header h3 {
    font-size: 20px;
    padding-right: 30px;
  }

  .modal-header p {
    font-size: 13px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
  }

  .progress-steps {
    padding: 16px 20px;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .step-label {
    font-size: 11px;
    margin-top: 6px;
  }

  .modal-body {
    padding: 16px;
    max-height: calc(90vh - 260px);
  }

  .modal-footer {
    padding: 14px 20px;
  }

  .btn-modal {
    padding: 11px 24px;
    font-size: 14px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 11px 14px;
    font-size: 14px;
  }

  .form-group textarea {
    min-height: 70px;
  }

  .service-grid {
    gap: 8px;
  }

  .service-option label {
    padding: 10px 12px;
    font-size: 13px;
  }

  .service-option label::before {
    width: 14px;
    height: 14px;
    margin-right: 8px;
  }

  .summary-item {
    padding: 10px 0;
  }

  .summary-label {
    font-size: 12px;
  }

  .summary-value {
    font-size: 14px;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Preserve scroll position on iOS */
@supports (-webkit-overflow-scrolling: touch) {
  body.modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
  }
}
