/* PottersWheel Questionnaire Form Styles */

.q-container {
  max-width: 900px;
  width: calc(100% - 2rem);
  margin: 2rem auto 5rem;
  padding: 0 1rem;
}

.q-header-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 3rem 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.q-header-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#e2e8f0 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.q-badge {
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.15);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.q-header-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.q-header-card p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 1.8rem;
  line-height: 1.6;
}

.share-link-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  max-width: 550px;
  margin: 0 auto;
}

.share-link-text {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-share {
  background: var(--text);
  color: white;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-share:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* Form Container & Steps */
.q-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.04);
}

.progress-header {
  margin-bottom: 2.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.progress-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  border-radius: 20px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Step Content */
.form-step {
  display: none;
  animation: fadeInStep 0.4s ease forwards;
}

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

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

.step-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.step-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Questions */
.q-group {
  margin-bottom: 2.2rem;
}

.q-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.q-label span.req {
  color: var(--accent-alt);
  margin-left: 0.2rem;
}

.q-subtext {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -0.4rem;
  margin-bottom: 0.8rem;
}

/* Inputs & Textareas */
.q-input, .q-textarea, .q-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.q-input:focus, .q-textarea:focus, .q-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.q-textarea {
  resize: vertical;
  min-height: 100px;
}

.input-naira-wrapper, .input-rand-wrapper, .input-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.naira-symbol, .rand-symbol, .currency-symbol {
  position: absolute;
  left: 1.2rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}

.input-naira-wrapper .q-input, .input-rand-wrapper .q-input, .input-currency-wrapper .q-input {
  padding-left: 2.4rem;
}

/* Options Grid / Radio Cards */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.option-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.option-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opt-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.option-card.square .opt-indicator {
  border-radius: 6px;
}

.opt-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  transform: scale(0);
  transition: transform 0.2s ease;
}

.option-card.square .opt-indicator::after {
  content: '✓';
  background: transparent;
  color: white;
  font-size: 12px;
  font-weight: bold;
  transform: scale(0);
}

.option-card.selected {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.option-card.selected .opt-indicator {
  background: var(--accent);
  border-color: var(--accent);
}

.option-card.selected .opt-indicator::after {
  transform: scale(1);
}

.opt-text {
  display: flex;
  flex-direction: column;
}

.opt-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.opt-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Feature Multi-select Chips */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
}

.chip-item {
  position: relative;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.chip-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.chip-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  transition: all 0.2s ease;
}

.chip-item.selected {
  background: #eff6ff;
  border-color: var(--accent);
  color: var(--accent);
}

.chip-item.selected .chip-check {
  background: var(--accent);
  border-color: var(--accent);
}

/* Multi-field Subgroups */
.subgroup-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

.subgroup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

/* Navigation Buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-nav-prev {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #cbd5e1;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-nav-prev:hover {
  background: #e2e8f0;
}

.btn-nav-next {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.85rem 2.2rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-nav-next:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-submit {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: white;
  border: none;
  padding: 0.95rem 2.5rem;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-icon-wrap {
  width: 70px;
  height: 70px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.5rem;
}

.modal-card h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.modal-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text);
  color: white;
  padding: 0.8rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-msg.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 640px) {
  .q-header-card {
    padding: 2.5rem 1.5rem 1.5rem;
  }
  .q-card {
    padding: 1.5rem 1.2rem;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .chips-grid {
    grid-template-columns: 1fr;
  }
  .share-link-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  .step-nav {
    flex-direction: column-reverse;
    gap: 1rem;
  }
  .btn-nav-prev, .btn-nav-next, .btn-submit {
    width: 100%;
    justify-content: center;
  }
}
