/* Questionnaire Modal Styles - Replaces Tailwind CSS */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(17, 24, 39, 0.75); /* gray-900 with 75% opacity */
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100001;
}

.modal-overlay.hidden {
  display: none;
}

/* Modal Content Box */
.modal-content-box {
  background-color: white;
  width: 100%;
  max-width: 36rem; /* max-w-xl = 576px */
  margin: 0 auto;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid #d1d5db; /* gray-300 */
  max-height: 90vh;
}

/* Modal Header */
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
}

.modal-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937; /* gray-800 */
  margin: 0;
}

.modal-close-btn {
  color: #9ca3af; /* gray-400 */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #4b5563; /* gray-600 */
}

.modal-close-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Progress Bar */
.progress-wrapper {
  margin-top: 1rem;
}

.progress-track {
  background-color: #e5e7eb; /* gray-200 */
  border-radius: 9999px;
  height: 0.625rem;
  overflow: hidden;
}

.progress-bar {
  background-color: #2563eb; /* blue-600 */
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Modal Body */
.modal-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal-body {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Introduction Container */
.intro-section {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.intro-text {
  font-size: 1.125rem;
  color: #374151; /* gray-700 */
  margin-bottom: 2rem;
}

.intro-text p {
  margin-bottom: 1rem;
}

.intro-text p:last-child {
  margin-bottom: 0;
}

/* Question Container */
.question-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .question-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

.question-text {
  font-size: 1.25rem;
  color: #374151; /* gray-700 */
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-align: center;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.option-button {
  padding: 1rem;
  background-color: white;
  border: 2px solid #d1d5db; /* gray-300 */
  border-radius: 0.5rem;
  color: #374151; /* gray-700 */
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-button:hover:not(:disabled) {
  background-color: #f3f4f6; /* gray-100 */
  border-color: #2563eb; /* blue-500 */
}

.option-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.option-button.selected {
  background-color: #2563eb; /* blue-600 */
  color: white;
  border-color: #2563eb;
}

/* Results Container */
.results-section {
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .results-section {
    padding-bottom: 1.5rem;
  }
}

.results-subheader {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2563eb; /* blue-600 */
  margin-bottom: 0.5rem;
}

.results-title {
  font-size: 1.875rem;
  font-weight: bold;
  color: #1f2937; /* gray-800 */
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .results-title {
    margin-bottom: 1rem;
  }
}

.results-analysis {
  font-size: 1rem;
  color: #4b5563; /* gray-600 */
  margin-bottom: 1rem;
}

.results-analysis p {
  margin-bottom: 1rem;
}

.results-analysis p:last-child {
  margin-bottom: 0;
}

.results-analysis ul {
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
  color: #4b5563;
}

.results-analysis li {
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .results-analysis {
    margin-bottom: 1.5rem;
  }
}

/* Chart Container */
.chart-wrapper {
  background-color: #f9fafb; /* gray-50 */
  border-radius: 0.75rem;
  padding: 0.5rem;
  margin: 1rem auto;
  max-width: 28rem;
}

@media (min-width: 640px) {
  .chart-wrapper {
    margin: 1.5rem auto;
  }
}

.chart-container {
  position: relative;
  height: 220px;
}

@media (min-width: 640px) {
  .chart-container {
    height: 280px;
  }
}

/* CTA Text */
.cta-text {
  font-size: 1rem;
  color: #374151; /* gray-700 */
  font-weight: 500;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .cta-text {
    margin-bottom: 1.25rem;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Modal Fade Animations */
.modal-fade-enter {
  opacity: 0;
  transform: scale(0.95);
}

.modal-fade-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-fade-leave-active {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mobile CTA Banner */
.mobile-cta-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb; /* gray-200 */
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #eee9e0;
}

/* Hide mobile banner on desktop */
@media (min-width: 768px) {
  .mobile-cta-banner {
    display: none;
  }
}
