/* StenoTest Pro - Comprehensive CSS for WordPress */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

.steno-pro-wrapper {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  margin: 20px 0;
  box-sizing: border-box;
}

.steno-pro-wrapper * {
  box-sizing: border-box;
}

/* Category Filter Tabs Bar (Matches Web App) */
.steno-category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 14px 2px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Search & Filter Bar directly below Category Tabs */
.steno-search-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 16px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  flex-wrap: wrap;
}

.steno-search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.steno-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.steno-search-input {
  width: 100%;
  padding: 8px 32px 8px 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
  transition: all 0.2s;
}

.steno-search-input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.steno-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  line-height: 1;
}

.steno-search-clear:hover {
  color: #475569;
}

.steno-search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.steno-filter-speed-select {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.steno-filter-speed-select:focus {
  background: #ffffff;
  border-color: #3b82f6;
}

.steno-test-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Modern Rounded Scroll Container for 50+ Tests */
.steno-tests-scroll-container {
  max-height: 860px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  padding-bottom: 15px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
  border-radius: 16px;
}

.steno-tests-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.steno-tests-scroll-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
  margin: 6px 0;
}

.steno-tests-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
  transition: background 0.2s;
}

.steno-tests-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

.steno-scroll-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 12px;
  padding: 0 4px;
}

.steno-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.steno-cat-pill:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.steno-cat-pill-active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35) !important;
}

.steno-cat-count {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.2s;
}

.steno-cat-pill-active .steno-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.steno-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0;
}

/* Catalog Grid */
.steno-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
  gap: 24px;
  justify-content: center;
  margin-top: 20px;
}

/* Single Dictation Card */
.steno-card-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.steno-card-wrapper:hover {
  transform: translateY(-4px);
}

/* Volume Tab Badge */
.steno-volume-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(to right, #f0f9ff, #eff6ff);
  border-top: 2px solid #38bdf8;
  border-left: 2px solid #38bdf8;
  border-right: 2px solid #38bdf8;
  border-bottom: none;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  width: fit-content;
  color: #1e3a8a;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  margin-left: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Card Main Body */
.steno-card-body {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.steno-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

/* Difficulty Section */
.steno-diff-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.steno-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 9999px;
  color: #78350f;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}

.steno-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.steno-progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Attribute Bullets */
.steno-attrs {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.steno-attrs li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.steno-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.steno-bullet-blue { background: #0ea5e9; box-shadow: 0 0 6px rgba(14,165,233,0.5); }
.steno-bullet-green { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.steno-bullet-orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.steno-bullet-red { background: #f43f5e; box-shadow: 0 0 6px rgba(244,63,94,0.5); }

.steno-badge-free {
  padding: 2px 8px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
}

/* Take Test Button */
.steno-btn-take-test {
  width: 100%;
  padding: 12px 16px;
  background: #0f172a;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.steno-btn-take-test:hover {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(15,23,42,0.2);
}

/* Test Runner UI */
.steno-runner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  background: #ffffff;
  padding: 15px 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.steno-clock-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  padding: 6px 20px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.steno-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.steno-btn-start { background: #2563eb; color: #fff; }
.steno-btn-start:hover { background: #1d4ed8; }
.steno-btn-end { background: #e11d48; color: #fff; }
.steno-btn-end:hover { background: #be123c; }

.steno-typing-box {
  width: 100%;
  height: 380px;
  padding: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  line-height: 1.8;
  resize: vertical;
  color: #0f172a;
  outline: none;
}
.steno-typing-box:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Media Player Box Hover & Alignment */
#steno-audio-player-box {
  transition: all 0.25s ease-in-out;
}
#steno-audio-player-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -2px rgba(124, 58, 237, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  border-color: #c084fc !important;
}
.steno-media-frame iframe,
.steno-media-frame video,
.steno-media-frame audio {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Result Dashboard */
.steno-result-section {
  margin-top: 30px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.steno-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.steno-stat-box {
  flex: 1;
  min-width: 120px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-align: center;
}
.steno-stat-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.steno-stat-val {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
}
.steno-stat-val-green { color: #10b981; }
.steno-stat-val-red { color: #e11d48; }

.steno-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
@media (max-width: 768px) {
  .steno-side-by-side { grid-template-columns: 1fr; }
}

.steno-passage-display {
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafafa;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Word Highlights */
.esstx9-hl-correct { color: #10b981; font-weight: 700; }
.esstx9-hl-full-err { background: #ffe4e6; color: #e11d48; font-weight: 800; padding: 0 4px; border-radius: 4px; text-decoration: line-through; }
.esstx9-hl-half-err { background: #ffedd5; color: #ea580c; font-weight: 800; padding: 0 4px; border-radius: 4px; border-bottom: 2px solid #ea580c; }
.esstx9-hl-addition { background: #ffe4e6; color: #e11d48; font-weight: 800; padding: 0 4px; border-radius: 4px; border-bottom: 2px dashed #e11d48; }

/* Mistake Table */
.steno-mistake-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 13px;
}
.steno-mistake-table th,
.steno-mistake-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.steno-mistake-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
}

/* Side-by-Side Test Runner Layout (Image Left + Typing Right) */
.steno-side-by-side-runner {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 20px;
  align-items: stretch;
  margin: 16px 0;
}

@media (max-width: 900px) {
  .steno-side-by-side-runner {
    grid-template-columns: 1fr;
  }
}

.steno-outline-pane {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.steno-outline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 8px;
}

.steno-outline-img-wrap {
  flex: 1;
  min-height: 380px;
  max-height: 560px;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.steno-outline-img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.15s ease-out;
  transform-origin: top center;
}

