/* Design Guide quiz — photon loading (matches job-results sun loading pattern) */

.dg-quiz-question-nav-host {
  margin-top: 1rem;
  width: 100%;
}

.dg-quiz-question-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.dg-quiz-question-nav .btn {
  flex: 1 1 0;
  min-width: 0;
}

.dg-quiz-loading {
  padding: 2.5rem 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f9fafb;
  text-align: center;
}

.dg-quiz-loading__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #374151;
  font-weight: 500;
}

@media (min-width: 768px) {
  .dg-quiz-loading__content {
    flex-direction: row;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
  }
}

.dg-quiz-loading__sun {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
}

.dg-quiz-loading__sun-icon.material-icons {
  display: block;
  font-size: 72px;
  width: 1em;
  height: 1em;
  line-height: 1;
  color: #f5c518;
  transform-origin: center center;
  animation: dg-quiz-sun-spin 4.5s linear infinite, dg-quiz-sun-pulse 1.5s ease-in-out infinite;
}

.dg-quiz-loading__text {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  text-align: center;
}

@media (min-width: 768px) {
  .dg-quiz-loading__text {
    text-align: left;
  }
}

.dg-quiz-loading__line1,
.dg-quiz-loading__line2 {
  margin: 0;
}

.dg-quiz-loading__line1 {
  font-size: 1.5rem;
  line-height: 1.3;
}

.dg-quiz-loading__line2 {
  font-size: 1.125rem;
  font-weight: 400;
  color: #6b7280;
}

.dg-quiz-loading__ellipsis {
  display: inline-block;
  text-align: left;
}

.dg-quiz-loading__ellipsis span {
  opacity: 0;
  animation: dg-quiz-ellipsis-dot 1.5s ease-in-out infinite;
}

.dg-quiz-loading__ellipsis span:nth-child(1) {
  animation-delay: 0s;
}

.dg-quiz-loading__ellipsis span:nth-child(2) {
  animation-delay: 0.5s;
}

.dg-quiz-loading__ellipsis span:nth-child(3) {
  animation-delay: 1s;
}

.dg-quiz-loading__progress {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
}

@keyframes dg-quiz-ellipsis-dot {
  0%,
  25% {
    opacity: 0;
  }
  35%,
  65% {
    opacity: 1;
  }
  75%,
  100% {
    opacity: 0;
  }
}

@keyframes dg-quiz-sun-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes dg-quiz-sun-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Results actions — match .btn-primary vertical alignment on outline link */
.design-guide-quiz-page .dg-quiz-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  line-height: 1.25;
  text-decoration: none;
}

.design-guide-hub-page .dg-quiz-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  line-height: 1.25;
  text-decoration: none;
}

.dg-quiz-choose-btn {
  cursor: pointer;
  width: 100%;
}

.quiz-option-btn,
.dg-quiz-choose-btn {
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.quiz-option-btn:hover:not(:disabled),
.dg-quiz-choose-btn:hover {
  border-color: #4a7a9a !important;
  background-color: #eef6fb;
  box-shadow: 0 4px 14px rgba(74, 122, 154, 0.22);
  transform: translateY(-2px);
}

.quiz-option-btn:focus-visible,
.dg-quiz-choose-btn:focus-visible {
  border-color: #4a7a9a !important;
  outline: 2px solid #5e93b6;
  outline-offset: 2px;
}

/* Hide landing copy while a quiz session is active */
.design-guide-quiz-page .dg-quiz-hemisphere-select {
  max-width: 16rem;
  min-width: 10rem;
}

.dg-quiz-header-row .dg-quiz-scope-control {
  flex-shrink: 0;
}

.dg-quiz-header-row .dg-quiz-progress-label {
  min-width: 0;
}

.design-guide-quiz-page.dg-quiz-in-progress #design-guide-quiz-landing,
.design-guide-quiz-page.dg-quiz-in-progress #design-guide-quiz-index,
.design-guide-quiz-page.dg-quiz-in-progress #design-guide-quiz-step-list {
  display: none !important;
}

.design-guide-article-page--embedded-quiz .dg-quiz-embedded {
  scroll-margin-top: 1rem;
  background: #fff;
  box-shadow: var(--mat-app-level-1, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.design-guide-article-page--embedded-quiz .dg-quiz-embedded .dg-quiz-question-nav-host {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  margin-bottom: -1.25rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

.dg-quiz-how-it-works {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f9fafb;
}

.design-guide-quiz-page .dg-quiz-how-it-works__heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #4a90b7;
}

.dg-quiz-how-it-works__steps {
  margin: 0;
  padding-left: 1.25rem;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dg-quiz-how-it-works__steps li + li {
  margin-top: 0.5rem;
}

.dg-quiz-meta-box {
  padding: 1rem;
  border-left: 4px solid #5e93b6;
  border-radius: 0.5rem;
  background: #f9fafb;
}

.dg-quiz-meta-box__label {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.dg-quiz-meta-box__value {
  margin: 0;
  color: #111827;
}

.dg-quiz-meta-box__row + .dg-quiz-meta-box__row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.dg-quiz-scenario-box {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
}

.dg-quiz-scenario-box__label {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.dg-quiz-scenario-box__key-info {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: #fffbeb;
}

.dg-quiz-orientation-compass,
.dg-quiz-tilt-diagram,
.dg-quiz-panel-array,
.dg-quiz-system-diagram {
  flex: 0 0 auto;
}

.dg-quiz-system-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dg-quiz-battery-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.dg-quiz-battery-indicator__label {
  font-size: 0.625rem;
  color: #6b7280;
  line-height: 1.2;
  text-align: center;
}

.dg-quiz-panel-array svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.dg-quiz-option-diagrams {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.dg-quiz-option-btn__body--with-compass {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.dg-quiz-option-btn__text {
  flex: 1 1 auto;
  min-width: 0;
}

.dg-quiz-profile-charts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.dg-quiz-profile-chart {
  margin: 0;
  flex: 0 1 min(100%, 18rem);
  text-align: center;
}

.dg-quiz-profile-chart__img {
  display: block;
  width: 100%;
  max-height: 10rem;
  object-fit: contain;
  margin: 0 auto;
}

.dg-quiz-profile-chart__caption {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
  text-align: center;
}

.dg-quiz-hourly-chart {
  margin: 0 auto;
  max-width: 28rem;
  text-align: center;
}

.dg-quiz-hourly-chart__svg {
  display: block;
  width: 100%;
  height: auto;
}

.dg-quiz-hourly-chart__caption {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.dg-quiz-hourly-chart__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
  font-size: 0.75rem;
  color: #4b5563;
}

.dg-quiz-hourly-chart__swatch::before {
  content: '';
  display: inline-block;
  width: 0.75rem;
  height: 0.125rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.dg-quiz-hourly-chart__swatch--load::before {
  background: #2563eb;
  height: 0.1875rem;
}

.dg-quiz-hourly-chart__swatch--equator::before {
  background: #16a34a;
  border-top: 1px dashed #16a34a;
  height: 0;
}

.dg-quiz-hourly-chart__swatch--wing::before {
  background: #15803d;
  height: 0.1875rem;
}

.dg-quiz-hourly-chart__swatch--rate::before {
  background: #ea580c;
}

.dg-quiz-result-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.dg-quiz-result-badge--correct {
  background: #dcfce7;
  color: #15803d;
}

.dg-quiz-result-badge--incorrect {
  background: #fef3c7;
  color: #b45309;
}

.dg-quiz-result-badge--depends {
  background: #dbeafe;
  color: #1d4ed8;
}

.dg-quiz-result-item__badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.dg-quiz-result-item__badge--correct {
  background: #dcfce7;
  color: #15803d;
}

.dg-quiz-result-item__badge--incorrect {
  background: #fef3c7;
  color: #b45309;
}

.dg-quiz-result-item__badge--depends {
  background: #dbeafe;
  color: #1d4ed8;
}
