/* AI Website Builder — client questionnaire styling
   Color scheme: Primary #2299A4, white background, black text. */

.aiwb-form-wrap {
  --aiwb-primary: #2299A4;
  --aiwb-primary-dark: #1b7a83;
  --aiwb-black: #111111;
  --aiwb-white: #ffffff;
  --aiwb-border: #e2e8e9;
  --aiwb-bg-soft: #f4fafb;

  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  background: var(--aiwb-white);
  color: var(--aiwb-black);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(17,17,17,0.06), 0 12px 32px rgba(17,17,17,0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.aiwb-form-wrap *, .aiwb-form-wrap *::before, .aiwb-form-wrap *::after { box-sizing: border-box; }

.aiwb-form-header { margin-bottom: 28px; }
.aiwb-form-header h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--aiwb-black);
}
.aiwb-form-header p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.5;
}

.aiwb-section {
  border: 1px solid var(--aiwb-border);
  border-radius: 10px;
  padding: 20px 20px 4px;
  margin-bottom: 20px;
  background: var(--aiwb-bg-soft);
}
.aiwb-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aiwb-primary-dark);
  margin-bottom: 14px;
}
.aiwb-section-title .aiwb-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aiwb-primary);
  color: var(--aiwb-white);
  font-size: 12px;
  font-weight: 700;
}

.aiwb-field { margin-bottom: 16px; }
.aiwb-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--aiwb-black);
  margin-bottom: 6px;
}
.aiwb-field .aiwb-optional {
  font-weight: 400;
  color: #6b7280;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.aiwb-field .aiwb-hint {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.aiwb-form-wrap input[type="text"],
.aiwb-form-wrap input[type="email"],
.aiwb-form-wrap input[type="tel"],
.aiwb-form-wrap input[type="url"],
.aiwb-form-wrap textarea,
.aiwb-form-wrap select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  border: 1.5px solid var(--aiwb-border);
  border-radius: 8px;
  background: var(--aiwb-white);
  color: var(--aiwb-black);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.aiwb-form-wrap textarea { resize: vertical; min-height: 90px; }

.aiwb-form-wrap input:focus,
.aiwb-form-wrap textarea:focus,
.aiwb-form-wrap select:focus {
  outline: none;
  border-color: var(--aiwb-primary);
  box-shadow: 0 0 0 3px rgba(34,153,164,0.18);
}

.aiwb-color-row { display: flex; align-items: center; gap: 12px; }
.aiwb-color-row input[type="color"] {
  width: 46px;
  height: 40px;
  padding: 2px;
  border: 1.5px solid var(--aiwb-border);
  border-radius: 8px;
  background: var(--aiwb-white);
  cursor: pointer;
}

/* Logo upload */
.aiwb-logo-upload {
  border: 1.5px dashed var(--aiwb-primary);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: var(--aiwb-white);
  cursor: pointer;
  transition: background 0.15s ease;
}
.aiwb-logo-upload:hover { background: rgba(34,153,164,0.06); }
.aiwb-logo-upload input[type="file"] {
  display: block;
  margin: 10px auto 0;
  font-size: 13px;
}
.aiwb-logo-upload .aiwb-logo-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
}
.aiwb-logo-preview {
  display: none;
  max-height: 70px;
  margin: 10px auto 0;
  border-radius: 6px;
}

.aiwb-submit-row { margin-top: 8px; padding-top: 4px; }
.aiwb-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--aiwb-primary);
  color: var(--aiwb-white);
  border: none;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.aiwb-submit-btn:hover { background: var(--aiwb-primary-dark); }
.aiwb-submit-btn:active { transform: translateY(1px); }
.aiwb-submit-btn:disabled {
  background: #9fb9bc;
  cursor: not-allowed;
}
.aiwb-required-note {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: 10px;
}

/* Inline error banner */
.aiwb-error-banner {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* Loading / redirect overlay */
.aiwb-status-panel {
  display: none;
  text-align: center;
  padding: 50px 20px 30px;
}
.aiwb-status-panel .aiwb-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 4px solid rgba(34,153,164,0.18);
  border-top-color: var(--aiwb-primary);
  animation: aiwb-spin 0.85s linear infinite;
}
@keyframes aiwb-spin { to { transform: rotate(360deg); } }
.aiwb-status-panel h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--aiwb-black);
}
.aiwb-status-panel p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}
.aiwb-status-panel.is-success .aiwb-spinner { border-top-color: var(--aiwb-primary); }

@media (max-width: 640px) {
  .aiwb-form-wrap { padding: 22px 18px; border-radius: 10px; }
  .aiwb-form-header h2 { font-size: 21px; }
}
