/* career-brain-assessment/assets/css/components.css */
/* Reusable UI Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-md);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
}

.btn-secondary {
  background: var(--gradient-accent);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Inputs */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Progress bar */
.progress-wrap {
  margin-bottom: var(--space-5);
}

.progress-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

/* Question card */
.question-card h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

/* Answer options */
.answers {
  display: grid;
  gap: var(--space-3);
}

.answer-option {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: #ffffff;
  text-align: left;
  transition: var(--transition-fast);
  cursor: pointer;
}

.answer-option:hover {
  border-color: var(--color-primary);
}

.answer-option.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-6);
  gap: var(--space-3);
}

/* Report cards */
.report-card {
  text-align: center;
  padding: var(--space-5);
}

.report-card h3 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-lg);
}

.report-card p {
  color: var(--color-muted);
}

/* Table */
.table {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: var(--space-3);
  text-align: left;
}

.table th {
  background: #f1f5f9;
}

/* Mobile bottom navigation */
.mobile-nav {
  display: none;
}

@media (max-width: 640px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    padding: var(--space-3);
    justify-content: space-between;
    z-index: 50;
  }
}

/* ---------------------------------------
   Fix "black blinking line" (focus + tap)
---------------------------------------- */

/* Remove default focus outline for mouse/touch users */
button:focus,
a:focus,
.answer-option:focus {
  outline: none;
}

/* Keep a nice focus ring for keyboard navigation */
button:focus-visible,
a:focus-visible,
.answer-option:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

/* Improve mobile tap behavior (removes tap flash) */
button,
a,
.answer-option {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent layout shift / footer repaint while navigating questions */
.page-assessment {
  min-height: 100vh;
}
