/* assets/css/brand-discovery-quiz.css */

/* Brand Discovery Quiz - Enhanced Maturity Assessment
   Matches brand-discovery-form.css styling with quiz-specific enhancements
*/

/* === Layout & Container === */
.bd-quiz-container {
  max-width: 700px;
  margin: 2.5em auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(17,24,39,0.06);
  padding: 2rem 2.25rem;
  position: relative;
  color: #111827;
}

/* === Quiz Header === */
.quiz-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.quiz-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827 !important;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.5px;
}

.quiz-header > p:first-of-type {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0.5rem 0;
  line-height: 1.5;
}

.quiz-header > p:last-of-type {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0.75rem 0 0 0;
  font-weight: 500;
}

/* === Form groups & labels === */
.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #374151;
}

.form-group label span {
  color: #dc2626;
  margin-left: 0.25em;
}

.field-description {
  margin: 0.5em 0;
  font-size: 0.9em;
  color: #6b7280;
  line-height: 1.4;
  max-width: 600px;
}

/* === Form Row (for side-by-side fields) === */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* === Inputs & Textareas ===
   Match form.css but with quiz-specific refinements
*/
.bd-quiz-container input,
.bd-quiz-container textarea,
.bd-quiz-container select {
  color: #111827 !important;
  background: #ffffff !important;
}

.bd-quiz-container input[type="text"],
.bd-quiz-container input[type="email"],
.bd-quiz-container textarea,
.bd-quiz-container select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.bd-quiz-container textarea {
  min-height: 120px;
  resize: vertical;
}

.bd-quiz-container 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='%234b5563' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.bd-quiz-container input:focus,
.bd-quiz-container textarea:focus,
.bd-quiz-container select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.bd-quiz-container input[disabled],
.bd-quiz-container textarea[disabled] {
  background: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

/* === Quiz Section (question container) === */
.quiz-section {
  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.35rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.25s ease-in;
}

.quiz-section:first-of-type {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.quiz-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: -0.3px;
}

.quiz-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.quiz-questions {
  margin: 1.5rem 0;
}

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

/* === Radio Groups === */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 0.95rem;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #111827;
  gap: 0.75rem;
}

.radio-group label:hover {
  background: #f8fafc;
  border-color: #d1d5db;
}

.radio-group input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #4f46e5;
}

.radio-group input[type="radio"]:checked + label,
.radio-group label:has(input[type="radio"]:checked) {
  background: #eff6ff;
  border-color: #4f46e5;
  font-weight: 500;
  color: #0369a1;
}

.radio-group input[type="radio"]:checked + label:hover,
.radio-group label:has(input[type="radio"]:checked):hover {
  background: #e0efff;
  border-color: #0284c7;
}

/* === Checkboxes (pills style) === */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.checkbox-wrapper {
  position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.checkbox-wrapper label {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  font-weight: normal;
  margin: 0;
  color: #111827 !important;
  font-size: 0.95rem;
  white-space: nowrap;
}

.checkbox-wrapper label:hover {
  background: #f8fafc;
  border-color: #d1d5db;
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
  background: #4f46e5;
  color: #ffffff !important;
  border-color: #4f46e5;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.checkbox-wrapper input[type="checkbox"]:checked + label:hover {
  background: #4338ca;
  border-color: #4338ca;
}

.checkbox-wrapper input[type="checkbox"]:disabled + label,
.checkbox-wrapper.bd-disabled label {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* === Progress Indicator (if using multi-step) === */
.bd-progress {
  margin: 0 0 1.75rem 0;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.bd-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bd-progress-text {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.bd-progress-hint {
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bd-progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  width: 0;
  transition: width 0.35s ease;
}

/* === Counters & Helper Text === */
.bd-char-counter {
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: right;
  margin-top: 0.35rem;
  transition: color 0.2s ease;
}

.bd-char-counter.bd-limit {
  color: #dc2626;
  font-weight: 600;
}

.bd-note {
  background: #f8fafc;
  border-left: 3px solid #4f46e5;
  padding: 0.75em 1em;
  margin: 1em 0;
  font-size: 0.95em;
  color: #4b5563;
  border-radius: 4px;
}

.bd-note strong {
  color: #1f2937;
}

.bd-note h5 {
  margin: 0 0 0.5rem 0;
  color: #111827;
  font-size: 0.95rem;
}

.bd-note ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

.bd-note li {
  margin: 0.35rem 0;
}

.bd-select-counter {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 15px;
  background: #e5e7eb;
  font-size: 0.825rem;
  margin-top: 0.75rem;
  color: #4b5563;
  font-weight: 500;
}

.bd-max-note {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.5rem;
  font-weight: normal;
}

/* === Primary Buttons === */
.bd-primary,
.brand-discovery-form-container button[type="submit"],
.brand-discovery-form-container .bd-next {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.75rem 1.75rem !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  background: linear-gradient(180deg, #5b4ff0, #4f46e5) !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.bd-primary:hover,
.brand-discovery-form-container button[type="submit"]:hover,
.brand-discovery-form-container .bd-next:hover {
  background: linear-gradient(180deg, #5146e0, #4338ca) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.25) !important;
}

.bd-primary:active,
.brand-discovery-form-container button[type="submit"]:active,
.brand-discovery-form-container .bd-next:active {
  transform: translateY(0) !important;
}

.bd-primary:focus,
.brand-discovery-form-container button[type="submit"]:focus,
.brand-discovery-form-container .bd-next:focus {
  outline: 3px solid rgba(99, 102, 241, 0.28) !important;
  outline-offset: 2px !important;
}

.bd-primary:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* === Submit Button Full Width on Mobile === */
@media (max-width: 640px) {
  .bd-primary,
  .brand-discovery-form-container button[type="submit"],
  .brand-discovery-form-container .bd-next {
    width: 100% !important;
  }
}

/* === Results Section === */
.quiz-results {
  animation: fadeIn 0.3s ease;
}

.quiz-result-header {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: white;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-result-header .icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.quiz-result-header h1 {
  font-size: 2rem;
  margin: 0 0 0.75rem 0;
/*  color: white; */
  line-height: 1.3;
}

.quiz-result-header p {
  font-size: 1.05rem;
  margin: 0;
  opacity: 0.95;
  line-height: 1.5;
}

.results-message {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.results-message h3 {
  color: #16a34a;
  margin-top: 0;
  font-size: 1.1rem;
}

.results-message ol {
  margin: 1rem 0;
  padding-left: 1.75rem;
}

.results-message li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* === Characteristic & Feature Lists === */
.characteristics {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.characteristics h3 {
  margin-top: 0;
  color: #111827;
  font-size: 1.15rem;
}

.characteristics ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.characteristics li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.5;
}

.characteristics li:last-child {
  border-bottom: none;
}

.characteristics li:before {
  content: "✓ ";
  color: #16a34a;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* === Challenge/Pain Point Boxes === */
.challenge-box {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.challenge-box h3 {
  color: #dc2626;
  margin-top: 0;
  font-size: 1.05rem;
}

.challenge-box p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #7f1d1d;
}

/* === Quick Win/Action Boxes === */
.quick-win {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.quick-win h3 {
  color: #16a34a;
  margin-top: 0;
  font-size: 1.05rem;
}

.quick-win p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #166534;
}

/* === Stat/Quote Boxes === */
.stat-box {
  background: #eff6ff;
  border-left: 4px solid #0369a1;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #1e40af;
  line-height: 1.7;
}

/* === Upgrade Section === */
.upgrade-section {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 2px solid #0369a1;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
}

.upgrade-section h2 {
  color: #0369a1;
  margin-top: 0;
  font-size: 1.35rem;
  line-height: 1.4;
}

.upgrade-section p {
  color: #4b5563;
  margin: 1rem 0;
  line-height: 1.6;
}

.upgrade-section .bd-primary {
  margin: 1rem 0;
}

.upgrade-button {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: white;
  padding: 1.2rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 1rem 0;
  transition: all 0.2s ease;
  font-weight: 600;
}

.upgrade-button:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(3, 105, 161, 0.25);
}

/* === Error Messages === */
.bd-error {
  color: #dc2626 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  margin-top: 0.35rem;
}

.bd-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  padding: 1rem;
  border-radius: 8px;
  color: #7f1d1d;
  margin-bottom: 1.5rem;
}

/* === Persona Cards === */
.persona-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.persona-card p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.persona-card strong {
  color: #111827;
}

/* === Results Table === */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.results-table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  line-height: 1.5;
}

.results-table td:first-child {
  font-weight: 600;
  background: #f8fafc;
  color: #111827;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .bd-quiz-container {
    padding: 1.5rem 1.25rem;
    margin: 1.5em auto;
  }

  .quiz-section {
    padding: 1rem;
  }

  .quiz-header h1 {
    font-size: 1.5rem;
  }

  .quiz-result-header {
    padding: 2rem 1.5rem;
  }

  .quiz-result-header .icon {
    font-size: 2.5rem;
  }

  .quiz-result-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .bd-quiz-container {
    border-radius: 12px;
    padding: 1.25rem 1rem;
  }

  .quiz-header h1 {
    font-size: 1.35rem;
  }

  .quiz-header > p:first-of-type {
    font-size: 0.95rem;
  }

  .quiz-section {
    padding: 1rem 0.75rem;
    margin-bottom: 1.25rem;
  }

  .quiz-section h4 {
    font-size: 0.9rem;
  }

  .radio-group label {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }

  .checkbox-wrapper label {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
  }

  .checkbox-group {
    gap: 0.5rem;
  }

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

  .upgrade-section {
    padding: 1.5rem 1rem;
  }

  .upgrade-section h2 {
    font-size: 1.1rem;
  }

  .quiz-result-header {
    padding: 1.5rem 1rem;
  }

  .quiz-result-header h1 {
    font-size: 1.3rem;
  }

  .quiz-result-header .icon {
    font-size: 2rem;
  }
}


/* === Print Styles === */
@media print {
  .bd-primary,
  button {
    display: none;
  }

  .bd-quiz-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
/* Validation summary shown above the quiz when a required field is missing. */
.bd-form-error {
	margin-bottom: 1.5em;
	padding: 0.9em 1.15em;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #7f1d1d;
}
