/* Onboarding Survey Modal Styles */
.onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 42, 38, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.onboarding-modal.active {
  opacity: 1;
  visibility: visible;
}

.onboarding-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.onboarding-modal.active .onboarding-content {
  transform: scale(1) translateY(0);
}

.onboarding-page {
  display: none;
  padding: 2rem;
  text-align: center;
  min-height: 500px;
}

.onboarding-page.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.onboarding-header {
  margin-bottom: 2rem;
}

.onboarding-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.onboarding-icon.success {
  background: linear-gradient(135deg, var(--green), #10d174);
}

.onboarding-icon:hover {
  transform: scale(1.05);
}

.onboarding-header h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.onboarding-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.onboarding-btn {
  min-width: 200px;
  height: 50px;
  font-size: 1.125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.onboarding-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(232, 97, 44, 0.2);
}

.onboarding-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--glass-bg);
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.onboarding-close:hover {
  background: var(--glass-border);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Survey Styles */
.survey-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--glass-border);
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  transition: width 0.5s ease;
  width: 25%;
}

.progress-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.survey-questions {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.survey-question {
  display: none;
  text-align: left;
}

.survey-question.active {
  display: block;
}

.survey-question h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.question-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Tag-style Options */
.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.tag-option {
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.tag-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-content {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--background);
  border: 2px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  user-select: none;
}

.tag-option:hover .tag-content {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

.tag-option input:checked + .tag-content {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.tag-option input:checked + .tag-content:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Other Input Styles */
.other-input {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.other-input .tag-option.other {
  margin-bottom: 0.5rem;
}

.other-input input[type="text"] {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem;
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--background);
  transition: all 0.3s ease;
  display: none;
}

.other-input input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glass-border);
}

.other-input input[type="text"].active {
  display: block;
}

/* Text Input Styles */
.text-input {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.text-input textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--background);
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.text-input textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glass-border);
}

.text-input textarea::placeholder {
  color: var(--text-secondary);
}

.char-counter {
  text-align: right;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.char-counter.warning {
  color: var(--secondary);
}

.char-counter.danger {
  color: var(--accent);
}

.survey-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.survey-navigation .btn {
  flex: 0;
  max-width: 120px;
  min-width: 80px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0 1rem;
}

.survey-navigation .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.survey-navigation .btn:not(:disabled):hover {
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .onboarding-modal {
    padding: var(--space-2);
  }

  .onboarding-page {
    padding: var(--space-6);
    min-height: 400px;
  }

  .onboarding-header h2 {
    font-size: var(--text-xl);
  }

  .onboarding-header p {
    font-size: var(--text-base);
  }

  .onboarding-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .tag-options {
    justify-content: center;
    gap: var(--space-2);
  }

  .tag-content {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
  }

  .text-input textarea {
    padding: 0.75rem;
    min-height: 100px;
    font-size: 0.875rem;
    margin: 0 1rem;
    width: calc(100% - 2rem);
  }

  .other-input input[type="text"] {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }

  .survey-navigation {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 1rem 1rem;
  }

  .survey-navigation .btn {
    max-width: 120px;
    min-width: 90px;
    flex: 0;
    font-size: 0.8rem;
  }

  .onboarding-actions {
    gap: 1rem;
  }

  .onboarding-btn {
    width: auto;
    max-width: 160px;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .onboarding-modal {
    padding: 0.25rem;
  }

  .onboarding-content {
    max-height: 98vh;
    max-width: 95vw;
  }

  .onboarding-page {
    padding: 1rem;
    min-height: 350px;
  }

  .onboarding-header h2 {
    font-size: 1.125rem;
  }

  .onboarding-header p {
    font-size: 0.875rem;
  }

  .onboarding-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .tag-options {
    gap: 0.25rem;
  }

  .tag-content {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
  }

  .survey-progress {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
  }

  .progress-bar {
    margin-right: 0;
    width: 100%;
  }

  .progress-text {
    font-size: 0.75rem;
  }

  .text-input textarea {
    margin: 0 0.5rem;
    width: calc(100% - 1rem);
    padding: 0.5rem;
    font-size: 0.8rem;
    min-height: 80px;
  }

  .survey-navigation {
    margin: 1rem 0.5rem 0.5rem;
  }

  .survey-navigation .btn {
    max-width: 90px;
    min-width: 70px;
    font-size: 0.75rem;
    height: 32px;
  }

  .onboarding-btn {
    height: 40px;
    font-size: 0.9rem;
    min-width: 100px;
    max-width: 140px;
  }

  .onboarding-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
  }
}

/* Extra small screens (< 360px) */
@media (max-width: 375px) {
  .onboarding-content {
    max-width: 98vw;
  }

  .onboarding-page {
    padding: 0.75rem;
  }

  .onboarding-header h2 {
    font-size: 1rem;
  }

  .onboarding-header p {
    font-size: 0.8rem;
    max-width: 280px;
  }

  .tag-content {
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
  }

  .text-input textarea {
    margin: 0 0.25rem;
    width: calc(100% - 0.5rem);
  }

  .survey-navigation .btn {
    max-width: 80px;
    min-width: 60px;
    font-size: 0.7rem;
    height: 30px;
  }

  .onboarding-btn {
    height: 36px;
    font-size: 0.8rem;
    min-width: 90px;
    max-width: 120px;
  }
}

/* Animation for page transitions */
.survey-question {
  animation: fadeInUp 0.3s ease-out;
}

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

/* Focus styles for accessibility */
.survey-option:focus-within .option-content {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.onboarding-close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .option-content {
    border-width: 3px;
  }

  .survey-option input:checked + .option-content {
    border-width: 4px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .onboarding-modal,
  .onboarding-content,
  .option-content,
  .progress-fill,
  .onboarding-icon,
  .onboarding-btn,
  .survey-navigation .btn {
    transition: none;
  }

  .survey-question {
    animation: none;
  }

  .survey-option:hover .option-content,
  .onboarding-btn:hover,
  .survey-navigation .btn:not(:disabled):hover {
    transform: none;
  }
}