/* ============================================
   ARCHETYPE v3.0 - Additional Styles
   Validity notices, improvements, and refinements
   ============================================ */

/* ============================================
   VALIDITY NOTICE STYLES
   ============================================ */

.validity-notice {
  background: rgba(201, 169, 89, 0.08);
  border: 1px solid rgba(201, 169, 89, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

.validity-notice strong {
  color: var(--gold);
  font-weight: 500;
}

.validity-notice p {
  margin: 0;
}

/* Warning variant (for more serious validity issues) */
.validity-notice.warning {
  background: rgba(201, 89, 89, 0.08);
  border-color: rgba(201, 89, 89, 0.3);
  border-left-color: #c95959;
}

.validity-notice.warning strong {
  color: #c95959;
}

/* ============================================
   IMPROVED LIKERT SCALE STYLES
   ============================================ */

/* Better visual feedback for scale buttons */
.answer-scale {
  position: relative;
}

.scale-options {
  position: relative;
}

/* Subtle connecting line between options */
.scale-options::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(201, 169, 89, 0.1) 0%,
    rgba(201, 169, 89, 0.2) 50%,
    rgba(201, 169, 89, 0.1) 100%);
  z-index: 0;
}

.scale-btn {
  position: relative;
  z-index: 1;
}

/* More prominent selection state */
.scale-btn.selected {
  box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(201, 169, 89, 0.3);
}

/* ============================================
   IMPROVED POLARITY SLIDER
   ============================================ */

/* More visible center indicator */
.polarity-ticks .tick.center {
  width: 4px;
  height: 16px;
  background: var(--gold);
  opacity: 0.8;
}

/* Active tick pulse animation */
.polarity-ticks .tick.active {
  animation: tickPulse 0.5s ease;
}

@keyframes tickPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ============================================
   SCENARIO OPTION IMPROVEMENTS
   ============================================ */

/* Better hover state */
.scenario-option:hover:not(.selected) {
  background: var(--bg-card-hover);
  border-color: var(--border-gold-hover);
  transform: translateX(4px);
}

/* More prominent selection */
.scenario-option.selected {
  background: rgba(201, 169, 89, 0.12);
  border-color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}

/* ============================================
   LOADING IMPROVEMENTS
   ============================================ */

/* Better loading step visibility */
.loading-step.active .step-icon {
  animation: stepPulse 1s ease infinite;
}

.loading-step.complete .step-icon {
  color: #7ac959;
}

.loading-step.complete .step-text {
  color: var(--text-secondary);
}

@keyframes stepPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   REPORT SECTION IMPROVEMENTS
   ============================================ */

/* Better table styling in reports */
.report-section table {
  margin: var(--space-lg) 0;
  border-collapse: collapse;
  width: 100%;
}

.report-section th {
  background: rgba(201, 169, 89, 0.1);
  border-bottom: 2px solid var(--gold);
  font-family: 'Cinzel', serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.report-section td {
  border-bottom: 1px solid var(--border-subtle);
}

.report-section tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Better blockquote styling */
.report-section blockquote {
  background: rgba(201, 169, 89, 0.05);
  border-radius: 0 4px 4px 0;
  padding: var(--space-md) var(--space-lg);
  font-style: italic;
}

/* ============================================
   ATTENTION CHECK STYLING
   ============================================ */

/* Subtle indicator for attention checks (for dev visibility) */
.question-card[data-attention-check="true"] {
  border-left: 3px solid rgba(122, 201, 89, 0.5);
}

/* ============================================
   REVERSE-SCORED ITEM INDICATOR (Dev) 
   ============================================ */

/* Subtle indicator for reverse items (can be hidden in production) */
.question-card[data-reverse="true"]::after {
  content: 'R';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: rgba(201, 169, 89, 0.3);
  font-family: monospace;
  display: none; /* Hide in production */
}

/* ============================================
   TOP RESULT CARDS IMPROVEMENTS
   ============================================ */

.top-result-card {
  position: relative;
  overflow: hidden;
}

/* Subtle category color accent */
.top-result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--category-color, var(--gold));
  opacity: 0.8;
}

/* Better hover interaction */
.top-result-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Better focus states for keyboard navigation */
.scale-btn:focus-visible,
.scenario-option:focus-visible,
.polarity-slider:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--bg-dark);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  font-family: 'Cinzel', serif;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   ANIMATION REFINEMENTS
   ============================================ */

/* Smoother question card entrance */
.question-card {
  animation: cardSlideIn 0.4s ease forwards;
  opacity: 0;
}

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

/* Stagger animation delays are set inline via JS */

/* ============================================
   RESULT PERCENTAGE BAR (Optional Enhancement)
   ============================================ */

.score-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ============================================
   CATEGORY COLOR UTILITIES
   ============================================ */

[data-category="power"] { --category-color: var(--cat-power); }
[data-category="roleplay"] { --category-color: var(--cat-roleplay); }
[data-category="primal"] { --category-color: var(--cat-primal); }
[data-category="bondage"] { --category-color: var(--cat-bondage); }
[data-category="sensation"] { --category-color: var(--cat-sensation); }
[data-category="psychological"] { --category-color: var(--cat-psychological); }
[data-category="voyeuristic"] { --category-color: var(--cat-voyeuristic); }
[data-category="general"] { --category-color: var(--cat-general); }
[data-category="relationship"] { --category-color: var(--cat-relationship); }
[data-category="financial"] { --category-color: var(--cat-financial); }

/* ============================================
   HIGH CONTRAST MODE SUPPORT
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --border-gold: rgba(201, 169, 89, 0.5);
    --text-muted: #b0b0b0;
    --bg-card: rgba(255, 255, 255, 0.05);
  }
  
  .scale-btn {
    border-width: 2px;
  }
  
  .scale-btn.selected {
    border-width: 3px;
  }
}

/* ============================================
   DARK MODE REFINEMENTS
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Already dark by default, but ensure consistency */
  .validity-notice {
    background: rgba(201, 169, 89, 0.06);
  }
}

/* ============================================
   PRINT ADDITIONS
   ============================================ */

@media print {
  .validity-notice {
    background: #fff8e6;
    border: 1px solid #c9a959;
    color: #333;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .validity-notice strong {
    color: #8a6914;
  }
}
