/* High-attention components for better UX/UI hierarchy */

/* Enhanced Buttons with stronger prominence */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  transition: transform .06s ease, filter .16s ease;
  text-decoration: none;
  font-family: var(--font-stack);
  font-size: 14px;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 3px solid rgba(10, 102, 194, .35);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(.95);
  color: #fff !important;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-alt);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: none;
}

.btn-ghost:hover {
  background: var(--accent-50);
}

/* Announcement Bar */
.announce {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: var(--accent-50);
  color: #083A7A;
  border-bottom: 1px solid var(--accent-100);
  padding: 10px;
  font-size: 14px;
}

.announce .link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* Hero Band with gradient */
.hero {
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  padding: 64px 0;
  text-align: center;
}

.hero .card {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-6);
}

.hero .lede {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto var(--space-5);
  font-size: 18px;
  line-height: 1.6;
}

.hero .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  justify-content: center;
}

.hero h1 {
  font-size: 40px;
  line-height: 48px;
  margin-bottom: var(--space-4);
  color: var(--text);
}

/* Segmented Control */
.segment {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 12px;
}

.segment button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segment [aria-pressed="true"] {
  background: var(--accent-100);
  border-color: var(--accent-600);
  color: var(--accent-700);
  font-weight: 700;
}

/* Chips / Filter tags */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.chip:hover {
  background: var(--accent-50);
  border-color: var(--accent-200);
}

.chip.is-active {
  background: var(--accent-100);
  border-color: var(--accent-600);
  color: var(--accent-700);
  font-weight: 600;
}

/* Sticky Bottom Bar */
.sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(6px);
  padding: 12px;
}

.sticky-bar .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
}

/* Stepper (progress dots) */
.stepper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stepper span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #E5E7EB;
  transition: background 0.2s ease;
}

.stepper .active {
  background: var(--accent);
}

/* Attention Cards/Callouts */
.callout {
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 12px;
  padding: 16px;
  color: var(--text);
}

.callout.warn {
  background: var(--warning-50);
  border-color: var(--warning-200);
  color: var(--warning-600);
}

.callout .icon {
  margin-right: 8px;
}

/* Progress meter */
.progress-meter {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  border: 1px solid var(--border);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
  margin: var(--space-2) 0;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}

.tab-button {
  padding: var(--space-3) var(--space-4);
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-button:hover {
  color: var(--text);
}

/* Badge components */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.success {
  background: var(--accent-alt);
  color: white;
}

.badge.warning {
  background: var(--warning-600);
  color: white;
}

.badge.pro {
  background: #10b981;
  color: white;
}

/* Enhanced cards with hover effects */
.card:hover {
  box-shadow: var(--shadow-2);
  transition: box-shadow 0.2s ease;
}

/* === INTERVIEW PAGE COMPONENTS === */

/* --- Sticky Header --- */
.q-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.q-header .row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
}

.stepper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stepper i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #E5E7EB;
  transition: background 0.2s ease;
}

.stepper i.active {
  background: var(--accent);
}

.timer {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* --- Question Card + Tabs --- */
.q-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  margin: 16px 0 0;
}

.tab {
  padding: 10px 12px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
  color: var(--muted);
}

.tab[aria-selected="true"] {
  background: var(--accent-100);
  border-color: var(--accent-600);
  color: #083A7A;
  font-weight: 700;
}

.tab:hover:not([aria-selected="true"]) {
  background: var(--bg-alt);
  color: var(--text);
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.5;
}

/* --- Recording Controls --- */
.rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.rec-btn:hover {
  background: var(--bg-alt);
}

.rec-btn.is-recording {
  border-color: #DC2626;
  background: #FEF2F2;
  color: #DC2626;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #DC2626;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.rec-btn:not(.is-recording) .dot {
  opacity: 0.35;
  animation: none;
}

/* --- Answer Input Enhancements --- */
.answer-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.answer-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

/* --- Autosave Indicator --- */
.save-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.save-status.saved {
  color: var(--accent-alt);
}

.save-status.saving {
  color: var(--warning-600);
}

/* --- Feedback Enhancement --- */
.feedback-panel {
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.score-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.score-value {
  font-weight: 700;
  color: var(--accent);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .q-header .row {
    padding: 8px 0;
    gap: 8px;
  }
  
  .timer {
    font-size: 12px;
  }
  
  .tabs {
    margin: 12px 0 0;
  }
  
  .tab {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .sticky-bar .row {
    padding: 8px 0;
    gap: 8px;
  }
  
  .score-grid {
    flex-direction: column;
    gap: 8px;
  }
}

/* --- Segmented Control (for new_session.html) --- */
.segment-group {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.segment-option {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.segment-option[aria-pressed="true"] {
  background: var(--accent-100);
  border-color: var(--accent-600);
  color: var(--accent-700);
  font-weight: 700;
}

.segment-option:hover:not([aria-pressed="true"]) {
  background: var(--bg-alt);
  color: var(--text);
}

/* --- Job Selection Enhancements --- */
.job-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.job-chip {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text);
}

.job-chip:hover {
  background: var(--accent-50);
  border-color: var(--accent-200);
}

.job-chip.selected {
  background: var(--accent-100);
  border-color: var(--accent-600);
  color: var(--accent-700);
  font-weight: 600;
}

/* Grid improvements */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
}

/* Sticky header enhancement */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(160%) blur(6px);
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.2s ease;
}

/* Typography improvements */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

h1 {
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
  color: var(--text);
}

h2 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  color: var(--text);
}

h3 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  color: var(--text);
}

/* Quick action cards */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.action-card {
  text-align: center;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.action-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
}

.action-card .icon {
  font-size: 32px;
  margin-bottom: var(--space-2);
}

.action-card h4 {
  margin: 0 0 var(--space-2);
  color: var(--accent);
}

/* Header CTA Button Fix - Ensure text stays white on hover */
.header-cta.btn-primary:hover,
.header-cta.btn-primary:focus,
.header-cta.btn-primary:active {
  color: #fff !important;
  text-decoration: none !important;
}

/* Additional fix for any primary buttons in header */
header .btn-primary:hover,
header .btn-primary:focus,
header .btn-primary:active {
  color: var(--pp-primary-contrast) !important;
}

/* ==============================================================================
   Updated Focus States & Accessibility
   ============================================================================== */

.btn:focus-visible,
.pp-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--pp-primary-focus);
  outline-offset: 2px;
}

/* Ensure minimum tap target sizes */
button,
.btn,
a[role="button"],
input,
select,
textarea {
  min-height: 44px;
  min-width: 44px;
}

/* ==============================================================================
   Testimonials Strip Component 
   ============================================================================== */

.pp-testimonials-strip {
  background: var(--pp-subsurface);
  padding: 2rem 0;
  border-top: 1px solid var(--pp-border);
  border-bottom: 1px solid var(--pp-border);
}

.pp-testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pp-testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Compact testimonial for session pages */
.pp-testimonial-compact {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}

.pp-testimonial-compact .pp-testimonial-header {
  margin-bottom: 0.5rem;
}

.pp-testimonial-compact .pp-testimonial-body {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* ==============================================================================
   Mobile-First Responsive Utilities
   ============================================================================== */

/* Full-width on mobile, constrained on larger screens */
.pp-responsive-width {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .pp-responsive-width {
    width: auto;
    max-width: none;
  }
}

/* Typography scale for new palette */
.pp-text--primary {
  color: var(--pp-text);
}

.pp-text--secondary {
  color: var(--pp-subtext);
}

.pp-text--accent {
  color: var(--pp-primary);
}

/* Card enhancements */
.pp-card {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
  transition: all 0.2s ease;
}

.pp-card:hover {
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.15);
  transform: translateY(-1px);
}

.pp-card--highlighted {
  border-color: var(--pp-primary);
  border-width: 2px;
  background: color-mix(in srgb, var(--pp-primary) 3%, var(--pp-surface));
}