/**
 * QuizBank Main Styles
 * WordPress Native Version - No React Required
 *
 * This file contains all necessary styles for QuizBank including:
 * - CSS Variables
 * - Tailwind-inspired utility classes
 * - Component classes
 * - Math rendering support
 * - Animations
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
  /* Colors - HSL format */
  --qb-background: 210 40% 98%;
  --qb-foreground: 222 47% 11%;

  --qb-card: 0 0% 100%;
  --qb-card-foreground: 222 47% 11%;

  --qb-primary: 221 83% 53%;        /* #4f46e5 - indigo-600 */
  --qb-primary-foreground: 210 40% 98%;

  --qb-secondary: 210 40% 96.1%;
  --qb-secondary-foreground: 222 47% 11.2%;

  --qb-success: 142 76% 36%;        /* #10b981 - green-600 */
  --qb-success-foreground: 0 0% 100%;

  --qb-danger: 0 84% 60%;            /* #ef4444 - red-500 */
  --qb-danger-foreground: 0 0% 100%;

  --qb-warning: 45 93% 47%;          /* #eab308 - yellow-500 */
  --qb-warning-foreground: 0 0% 100%;

  --qb-muted: 210 40% 96.1%;
  --qb-muted-foreground: 215 16% 47%;

  --qb-border: 214 32% 91%;
  --qb-input: 214 32% 91%;
  --qb-ring: 221 83% 53%;

  --qb-radius: 0.75rem;

  /* Spacing scale */
  --qb-spacing-xs: 0.25rem;  /* 4px */
  --qb-spacing-sm: 0.5rem;   /* 8px */
  --qb-spacing-md: 1rem;     /* 16px */
  --qb-spacing-lg: 1.5rem;   /* 24px */
  --qb-spacing-xl: 2rem;     /* 32px */
  --qb-spacing-2xl: 3rem;    /* 48px */

  /* Font sizes */
  --qb-text-xs: 0.75rem;     /* 12px */
  --qb-text-sm: 0.875rem;    /* 14px */
  --qb-text-base: 1rem;      /* 16px */
  --qb-text-lg: 1.125rem;    /* 18px */
  --qb-text-xl: 1.25rem;     /* 20px */
  --qb-text-2xl: 1.5rem;     /* 24px */
  --qb-text-3xl: 1.875rem;   /* 30px */
  --qb-text-4xl: 2.25rem;    /* 36px */

  /* Shadows */
  --qb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --qb-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --qb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --qb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --qb-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ==========================================
   BASE STYLES
   ========================================== */

.quizbank-wrapper {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: hsl(var(--qb-background));
  color: hsl(var(--qb-foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.quizbank-wrapper * {
  box-sizing: border-box;
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */

.qb-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.qb-container-fluid {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

.qb-flex {
  display: flex;
}

.qb-flex-col {
  display: flex;
  flex-direction: column;
}

.qb-grid {
  display: grid;
}

.qb-grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.qb-grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qb-grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qb-grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qb-gap-2 {
  gap: 0.5rem;
}

.qb-gap-3 {
  gap: 0.75rem;
}

.qb-gap-4 {
  gap: 1rem;
}

.qb-gap-6 {
  gap: 1.5rem;
}

.qb-gap-8 {
  gap: 2rem;
}

/* ==========================================
   SPACING UTILITIES
   ========================================== */

.qb-p-0 { padding: 0; }
.qb-p-1 { padding: 0.25rem; }
.qb-p-2 { padding: 0.5rem; }
.qb-p-3 { padding: 0.75rem; }
.qb-p-4 { padding: 1rem; }
.qb-p-6 { padding: 1.5rem; }
.qb-p-8 { padding: 2rem; }

.qb-px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.qb-px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.qb-px-4 { padding-left: 1rem; padding-right: 1rem; }
.qb-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.qb-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.qb-py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.qb-py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.qb-m-0 { margin: 0; }
.qb-m-2 { margin: 0.5rem; }
.qb-m-4 { margin: 1rem; }

.qb-mb-2 { margin-bottom: 0.5rem; }
.qb-mb-4 { margin-bottom: 1rem; }
.qb-mb-6 { margin-bottom: 1.5rem; }
.qb-mb-8 { margin-bottom: 2rem; }

.qb-mt-2 { margin-top: 0.5rem; }
.qb-mt-4 { margin-top: 1rem; }
.qb-mt-6 { margin-top: 1.5rem; }

/* ==========================================
   TEXT UTILITIES
   ========================================== */

.qb-text-xs { font-size: var(--qb-text-xs); }
.qb-text-sm { font-size: var(--qb-text-sm); }
.qb-text-base { font-size: var(--qb-text-base); }
.qb-text-lg { font-size: var(--qb-text-lg); }
.qb-text-xl { font-size: var(--qb-text-xl); }
.qb-text-2xl { font-size: var(--qb-text-2xl); }
.qb-text-3xl { font-size: var(--qb-text-3xl); }
.qb-text-4xl { font-size: var(--qb-text-4xl); }

.qb-font-normal { font-weight: 400; }
.qb-font-medium { font-weight: 500; }
.qb-font-semibold { font-weight: 600; }
.qb-font-bold { font-weight: 700; }

.qb-text-center { text-align: center; }
.qb-text-left { text-align: left; }
.qb-text-right { text-align: right; }

.qb-text-gray-500 { color: #6b7280; }
.qb-text-gray-600 { color: #4b5563; }
.qb-text-gray-700 { color: #374151; }
.qb-text-gray-900 { color: #111827; }

.qb-text-primary { color: hsl(var(--qb-primary)); }
.qb-text-success { color: hsl(var(--qb-success)); }
.qb-text-danger { color: hsl(var(--qb-danger)); }

.qb-uppercase { text-transform: uppercase; }
.qb-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   COMPONENT CLASSES - CARDS
   ========================================== */

.qb-card {
  background: hsl(var(--qb-card));
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow-sm);
  border: 1px solid hsl(var(--qb-border));
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.qb-card:hover {
  box-shadow: var(--qb-shadow-md);
}

.qb-card-compact {
  background: hsl(var(--qb-card));
  border-radius: 0.5rem;
  box-shadow: var(--qb-shadow-sm);
  border: 1px solid hsl(var(--qb-border));
  padding: 1rem;
}

/* ==========================================
   COMPONENT CLASSES - BUTTONS
   ========================================== */

.qb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.qb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.qb-btn-primary {
  background: hsl(var(--qb-primary));
  color: hsl(var(--qb-primary-foreground));
}

.qb-btn-primary:hover:not(:disabled) {
  background: hsl(221 83% 48%); /* indigo-700 */
}

.qb-btn-success {
  background: hsl(var(--qb-success));
  color: hsl(var(--qb-success-foreground));
}

.qb-btn-success:hover:not(:disabled) {
  background: hsl(142 76% 30%);
}

.qb-btn-danger {
  background: hsl(var(--qb-danger));
  color: hsl(var(--qb-danger-foreground));
}

.qb-btn-danger:hover:not(:disabled) {
  background: hsl(0 84% 55%);
}

.qb-btn-secondary {
  background: hsl(var(--qb-secondary));
  color: hsl(var(--qb-secondary-foreground));
  border: 1px solid hsl(var(--qb-border));
}

.qb-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb; /* gray-200 */
}

.qb-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.qb-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ==========================================
   COMPONENT CLASSES - INPUTS
   ========================================== */

.qb-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--qb-border));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: all 0.2s ease;
  background: white;
}

.qb-input:focus {
  outline: none;
  border-color: hsl(var(--qb-primary));
  box-shadow: 0 0 0 3px hsla(var(--qb-primary) / 0.1);
}

.qb-input::placeholder {
  color: hsl(var(--qb-muted-foreground));
}

.qb-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--qb-foreground));
  margin-bottom: 0.5rem;
}

.qb-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--qb-border));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
}

.qb-textarea:focus {
  outline: none;
  border-color: hsl(var(--qb-primary));
  box-shadow: 0 0 0 3px hsla(var(--qb-primary) / 0.1);
}

.qb-select {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid hsl(var(--qb-border));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.5rem center/1.25em 1.25em;
  appearance: none;
}

.qb-select:focus {
  outline: none;
  border-color: hsl(var(--qb-primary));
  box-shadow: 0 0 0 3px hsla(var(--qb-primary) / 0.1);
}

.qb-checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid hsl(var(--qb-border));
  border-radius: 0.25rem;
  cursor: pointer;
}

.qb-checkbox:checked {
  background-color: hsl(var(--qb-primary));
  border-color: hsl(var(--qb-primary));
}

/* ==========================================
   COMPONENT CLASSES - QUESTION CARD
   ========================================== */

.qb-question-card {
  background: white;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow-sm);
  border: 1px solid hsl(var(--qb-border));
  padding: 1.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.qb-question-card:hover {
  border-color: hsl(var(--qb-primary));
  box-shadow: var(--qb-shadow-md);
}

.qb-question-card.selected {
  border-color: hsl(var(--qb-primary));
  background: hsla(var(--qb-primary) / 0.05);
}

.qb-question-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: hsl(var(--qb-primary));
  border-radius: var(--qb-radius) 0 0 var(--qb-radius);
}

.qb-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #f3f4f6; /* gray-100 */
  color: #6b7280; /* gray-500 */
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.qb-question-number.active {
  background: hsl(var(--qb-primary));
  color: white;
}

.qb-question-text {
  color: hsl(var(--qb-foreground));
  line-height: 1.6;
}

.qb-question-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.qb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.qb-badge-primary {
  background: hsla(var(--qb-primary) / 0.1);
  color: hsl(var(--qb-primary));
}

.qb-badge-success {
  background: hsla(var(--qb-success) / 0.1);
  color: hsl(var(--qb-success));
}

.qb-badge-warning {
  background: hsla(var(--qb-warning) / 0.1);
  color: hsl(var(--qb-warning));
}

.qb-badge-danger {
  background: hsla(var(--qb-danger) / 0.1);
  color: hsl(var(--qb-danger));
}

/* ==========================================
   COMPONENT CLASSES - MODAL
   ========================================== */

.qb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.qb-modal {
  background: white;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.qb-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--qb-border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qb-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--qb-foreground));
  margin: 0;
}

.qb-modal-body {
  padding: 1.5rem;
}

.qb-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid hsl(var(--qb-border));
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.qb-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #6b7280;
  transition: color 0.2s;
}

.qb-modal-close:hover {
  color: #111827;
}

/* ==========================================
   COMPONENT CLASSES - ALERT
   ========================================== */

.qb-alert {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.qb-alert-success {
  background: hsla(var(--qb-success) / 0.1);
  border-color: hsl(var(--qb-success));
  color: hsl(var(--qb-success));
}

.qb-alert-danger {
  background: hsla(var(--qb-danger) / 0.1);
  border-color: hsl(var(--qb-danger));
  color: hsl(var(--qb-danger));
}

.qb-alert-warning {
  background: hsla(var(--qb-warning) / 0.1);
  border-color: hsl(var(--qb-warning));
  color: hsl(45 93% 40%);
}

.qb-alert-info {
  background: hsla(var(--qb-primary) / 0.1);
  border-color: hsl(var(--qb-primary));
  color: hsl(var(--qb-primary));
}

/* ==========================================
   COMPONENT CLASSES - LOADING
   ========================================== */

.qb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.qb-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top-color: hsl(var(--qb-primary));
  border-radius: 50%;
  animation: qb-spin 0.8s linear infinite;
}

@keyframes qb-spin {
  to { transform: rotate(360deg); }
}

.qb-spinner-sm {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2px;
}

/* ==========================================
   COMPONENT CLASSES - TABS
   ========================================== */

.qb-tabs {
  border-bottom: 2px solid hsl(var(--qb-border));
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.qb-tab {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: hsl(var(--qb-muted-foreground));
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.qb-tab:hover {
  color: hsl(var(--qb-foreground));
}

.qb-tab.active {
  color: hsl(var(--qb-primary));
  border-bottom-color: hsl(var(--qb-primary));
}

/* ==========================================
   COMPONENT CLASSES - SIDEBAR
   ========================================== */

.qb-sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid hsl(var(--qb-border));
  height: 100vh;
  overflow-y: auto;
  padding: 1rem;
}

.qb-sidebar-header {
  padding: 1rem 0;
  border-bottom: 1px solid hsl(var(--qb-border));
  margin-bottom: 1rem;
}

.qb-sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--qb-foreground));
  margin: 0;
}

.qb-sidebar-item {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
  color: hsl(var(--qb-foreground));
  text-decoration: none;
  display: block;
}

.qb-sidebar-item:hover {
  background: hsl(var(--qb-secondary));
}

.qb-sidebar-item.active {
  background: hsla(var(--qb-primary) / 0.1);
  color: hsl(var(--qb-primary));
  font-weight: 600;
}

/* ==========================================
   COMPONENT CLASSES - STATS BAR
   ========================================== */

.qb-stats-bar {
  background: hsla(var(--qb-primary) / 0.1);
  border: 1px solid hsl(var(--qb-primary));
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qb-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qb-stat-label {
  font-size: 0.75rem;
  color: hsl(var(--qb-muted-foreground));
  text-transform: uppercase;
  font-weight: 600;
}

.qb-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--qb-primary));
}

/* ==========================================
   MATH RENDERING SUPPORT
   ========================================== */

/* KaTeX display mode overflow fix and custom scrollbar */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5em 0.1em;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.katex-display::-webkit-scrollbar {
  height: 6px;
}

.katex-display::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.katex-display::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.katex-display::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* LaTeX inline rendering - prevent line breaks */
.inline-math {
  display: inline;
  white-space: normal;
}

.inline-math .katex {
  display: inline !important;
  white-space: nowrap;
  vertical-align: baseline;
}

.math-content {
  display: block;
}

.math-content .katex {
  display: inline !important;
  white-space: nowrap;
  vertical-align: baseline;
}

.katex-display {
  display: block !important;
  margin: 0.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Prevent LaTeX from breaking into multiple lines */
.katex .base {
  white-space: nowrap;
}

/* Better spacing for inline math */
.katex + .katex {
  margin-left: 0.2em;
}

/* Ensure inline math doesn't cause line height issues */
.inline-math .katex,
.math-content .katex {
  line-height: 1.2;
  font-size: 1.1em;
}

/* Fix for options and answers */
.inline-math p,
.math-content p {
  display: inline;
  margin: 0;
}

/* Prevent unwanted line breaks in math expressions */
.katex-html {
  white-space: nowrap;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes qb-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qb-fade-in {
  animation: qb-fade-in 0.3s ease;
}

@keyframes qb-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qb-slide-up {
  animation: qb-slide-up 0.4s ease;
}

@keyframes qb-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.qb-pulse {
  animation: qb-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

.quizbank-wrapper ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.quizbank-wrapper ::-webkit-scrollbar-track {
  background: transparent;
}

.quizbank-wrapper ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quizbank-wrapper ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.qb-hidden {
  display: none !important;
}

.qb-block {
  display: block;
}

.qb-inline-block {
  display: inline-block;
}

.qb-w-full {
  width: 100%;
}

.qb-h-full {
  height: 100%;
}

.qb-min-h-screen {
  min-height: 100vh;
}

.qb-sticky {
  position: sticky;
}

.qb-fixed {
  position: fixed;
}

.qb-relative {
  position: relative;
}

.qb-absolute {
  position: absolute;
}

.qb-top-0 {
  top: 0;
}

.qb-right-0 {
  right: 0;
}

.qb-bottom-0 {
  bottom: 0;
}

.qb-left-0 {
  left: 0;
}

.qb-z-10 {
  z-index: 10;
}

.qb-z-50 {
  z-index: 50;
}

.qb-rounded {
  border-radius: 0.25rem;
}

.qb-rounded-lg {
  border-radius: 0.5rem;
}

.qb-rounded-xl {
  border-radius: 0.75rem;
}

.qb-rounded-full {
  border-radius: 9999px;
}

.qb-border {
  border-width: 1px;
  border-style: solid;
}

.qb-border-2 {
  border-width: 2px;
}

.qb-border-gray-200 {
  border-color: #e5e7eb;
}

.qb-border-primary {
  border-color: hsl(var(--qb-primary));
}

.qb-bg-white {
  background-color: white;
}

.qb-bg-gray-50 {
  background-color: #f9fafb;
}

.qb-bg-gray-100 {
  background-color: #f3f4f6;
}

.qb-bg-primary {
  background-color: hsl(var(--qb-primary));
}

.qb-shadow-sm {
  box-shadow: var(--qb-shadow-sm);
}

.qb-shadow {
  box-shadow: var(--qb-shadow);
}

.qb-shadow-md {
  box-shadow: var(--qb-shadow-md);
}

.qb-shadow-lg {
  box-shadow: var(--qb-shadow-lg);
}

.qb-transition {
  transition: all 0.2s ease;
}

.qb-cursor-pointer {
  cursor: pointer;
}

.qb-cursor-not-allowed {
  cursor: not-allowed;
}

.qb-opacity-50 {
  opacity: 0.5;
}

.qb-opacity-70 {
  opacity: 0.7;
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */

@media (max-width: 768px) {
  .qb-grid-cols-2,
  .qb-grid-cols-3,
  .qb-grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .qb-sidebar {
    position: fixed;
    left: -280px;
    transition: left 0.3s ease;
    z-index: 100;
  }

  .qb-sidebar.open {
    left: 0;
  }

  .qb-modal {
    max-width: 95%;
  }
}

@media (max-width: 640px) {
  .qb-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .qb-card,
  .qb-question-card {
    padding: 1rem;
  }

  .qb-text-4xl {
    font-size: 1.875rem;
  }

  .qb-text-3xl {
    font-size: 1.5rem;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  .qb-sidebar,
  .qb-btn,
  .qb-stats-bar,
  .qb-modal-overlay {
    display: none !important;
  }

  .qb-question-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .quizbank-wrapper {
    background: white;
  }
}
