/* ===== QUESTIONNAIRE STYLES ===== */

/* Layout & Container */
.questionnaire-section {
  padding-top: 120px;
  padding-bottom: 60px;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.questionnaire-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

/* ===== PROGRESS BAR ===== */
.progress-wrapper {
  margin-bottom: 48px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 92, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, #FF5C00, #FF8C00);
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(255, 92, 0, 0.6);
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#stepCounter {
  color: #FF5C00;
  font-weight: 700;
}

#stepName {
  color: var(--white);
  font-weight: 700;
}

/* ===== FORM STYLES ===== */
.onboarding-form {
  position: relative;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeInStep 0.4s ease;
}

.form-step.active {
  display: block;
}

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

/* Step Header */
.step-header {
  margin-bottom: 48px;
  border-bottom: 1px solid #222;
  padding-bottom: 32px;
}

.step-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.step-header p {
  font-size: 16px;
  color: #888;
  line-height: 1.6;
}

/* Form Header (for subsections) */
.form-header {
  margin-bottom: 24px;
  margin-top: 32px;
  padding-bottom: 0;
}

.form-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}

.form-header p {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-grid.triple {
  grid-template-columns: repeat(3, 1fr);
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group label::after {
  content: '';
}

.form-group label.required::after {
  content: ' *';
  color: #FF5C00;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid #222;
  border-radius: 4px;
  background: #0a0a0a;
  color: var(--white);
  transition: all 0.2s;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: #FF5C00;
  background: #111;
  box-shadow: 0 0 8px rgba(255, 92, 0, 0.2);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font);
}

/* Select Dropdown */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Checkbox & Radio Styles */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #FF5C00;
  margin-right: 8px;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  font-size: 15px;
}

.checkbox-item label,
.radio-item label {
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Service Items Container */
.service-items-container,
#primaryServicesContainer,
#secondaryServicesContainer {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  padding: 16px;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}

.service-item {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  margin-bottom: 12px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.service-item:last-child {
  margin-bottom: 0;
}

.service-number {
  font-weight: 600;
  color: #FF5C00;
  font-size: 14px;
  padding-top: 10px;
}

.service-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}

.service-item input,
.service-item select {
  font-size: 13px;
  padding: 10px 8px;
}

.service-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.service-item .remove-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.service-item .remove-btn:hover {
  color: #FF5C00;
}

/* Add Service Button */
.add-service-btn,
.btn-add-service {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px dashed #FF5C00;
  color: #FF5C00;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.add-service-btn:hover,
.btn-add-service:hover {
  background: rgba(255, 92, 0, 0.1);
  border-color: #FF8C00;
  color: #FF8C00;
}

/* Final Section (Step 8) */
.final-section {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 32px;
  margin-bottom: 32px;
}

.final-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--white);
}

.final-section p {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Fieldset Styles */
fieldset {
  border: 1px solid #222;
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 32px;
}

fieldset legend {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  padding: 0 12px;
  margin-left: -12px;
}

/* Range Input */
input[type="range"] {
  width: 100%;
  cursor: pointer;
  accent-color: #FF5C00;
}

/* ===== FORM NAVIGATION ===== */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #222;
  gap: 16px;
}

.form-nav button {
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-prev {
  background: transparent;
  color: #888;
  border: 1px solid #333;
}

.btn-prev:hover {
  color: var(--white);
  border-color: #555;
}

.btn-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-next,
.btn-submit {
  background: #FF5C00;
  color: var(--white);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.btn-next:hover,
.btn-submit:hover {
  background: #FF8C00;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 92, 0, 0.4);
}

.btn-submit {
  display: none;
  width: 100%;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-submit.show {
  display: block;
}

/* Step Counter */
.step-counter-nav {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

/* ===== SUCCESS MESSAGE ===== */
#successMessage {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0a0a0a;
  border: 2px solid #FF5C00;
  border-radius: 8px;
  padding: 48px;
  max-width: 500px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 92, 0, 0.3);
  animation: slideUp 0.4s ease;
}

#successMessage.show {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

#successMessage h3 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #FF5C00;
}

#successMessage p {
  font-size: 15px;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.6;
}

#successMessage .btn {
  margin-top: 16px;
}

/* Success Checkmark */
.success-icon {
  font-size: 64px;
  margin-bottom: 24px;
  display: block;
}

/* Success Message Backdrop */
#successBackdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

#successBackdrop.show {
  display: block;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
  .questionnaire-section {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .questionnaire-container {
    padding: 0 16px;
  }

  .step-header h2 {
    font-size: 24px;
  }

  .step-header p {
    font-size: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-grid.triple {
    grid-template-columns: 1fr 1fr;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .service-inputs {
    grid-template-columns: 1fr 1fr;
  }

  .service-number {
    padding-top: 0;
  }

  .form-nav {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .form-nav button {
    width: 100%;
  }

  .step-counter-nav {
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }

  .progress-text {
    flex-direction: column;
    gap: 8px;
  }

  #successMessage {
    padding: 32px 24px;
    max-width: calc(100% - 32px);
  }

  #successMessage h3 {
    font-size: 22px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .questionnaire-section {
    padding-top: 90px;
    padding-bottom: 30px;
  }

  .questionnaire-container {
    padding: 0 12px;
  }

  .progress-wrapper {
    margin-bottom: 32px;
  }

  .step-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
  }

  .step-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .step-header p {
    font-size: 13px;
  }

  .form-grid {
    gap: 16px;
  }

  .form-group label {
    font-size: 12px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px;
    padding: 12px 12px;
  }

  .service-items-container {
    padding: 12px;
  }

  .service-item {
    padding: 12px;
    margin-bottom: 12px;
  }

  .service-inputs {
    grid-template-columns: 1fr;
  }

  .service-item .form-group input {
    font-size: 16px;
  }

  .form-nav {
    margin-top: 32px;
    padding-top: 24px;
  }

  .form-nav button {
    padding: 12px 16px;
    font-size: 12px;
  }

  #successMessage {
    padding: 24px 20px;
    margin: 0 12px;
  }

  #successMessage h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  #successMessage p {
    font-size: 13px;
  }

  .success-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }
}

/* Landscape Mobile */
@media (max-height: 600px) and (max-width: 900px) {
  .questionnaire-section {
    padding-top: 80px;
    padding-bottom: 20px;
  }

  .progress-wrapper {
    margin-bottom: 24px;
  }

  .step-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .form-grid {
    gap: 16px;
    margin-bottom: 20px;
  }

  .form-nav {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  select,
  textarea,
  button,
  .form-nav button {
    transition: none;
  }

  .form-step {
    animation: none;
  }

  #successMessage {
    animation: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  select,
  textarea {
    border-color: #666;
  }

  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="tel"]:focus,
  input[type="number"]:focus,
  input[type="url"]:focus,
  select:focus,
  textarea:focus {
    border-color: #FFFF00;
    box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.3);
  }
}

/* Focus Visible for Keyboard Navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #FF5C00;
  outline-offset: 2px;
}

/* Link Underline for Readability */
a {
  text-decoration: underline;
}

a.logo-mark {
  text-decoration: none;
}
