/* YouTube to Transcript — Dedicated Styles */

/* Search bar */
#transcript-url-input {
  flex: 1;
  padding: 1rem 1.5rem;
  padding-right: 230px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
#transcript-url-input::placeholder { color: #64748b; }
#transcript-url-input:focus { border-color: #ffffff; box-shadow: 0 0 25px rgba(255, 255, 255, 0.4); }

#transcript-fetch-btn {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 8px;
  background: #1877F2;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}
#transcript-fetch-btn:hover { background: #1565C0; box-shadow: 0 6px 18px rgba(24, 119, 242, 0.6); }
#transcript-fetch-btn:disabled { opacity: 0.6; cursor: not-allowed; }




/* Specific Tool Styles */
.tr-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.tr-stat-card {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tr-stat-icon {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.tr-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tr-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tr-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.tr-toolbar-left, .tr-toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tr-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.tr-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tr-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.2);
  transition: .4s;
  border-radius: 34px;
}

[data-theme="light"] .tr-slider {
  background-color: rgba(0,0,0,0.2);
}

.tr-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .tr-slider {
  background-color: var(--accent-red);
}

input:checked + .tr-slider:before {
  transform: translateX(20px);
}

.tr-toggle-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.tr-action-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.tr-action-btn.primary {
  background: var(--text-primary);
  color: var(--bg);
}

.tr-action-btn.primary:hover {
  opacity: 0.9;
}

.tr-action-btn.secondary {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.tr-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .tr-action-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Download Dropdown */
.tr-dropdown {
  position: relative;
  display: inline-block;
}

.tr-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background-color: var(--surface);
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
  overflow: hidden;
}

.tr-dropdown:hover .tr-dropdown-content,
.tr-dropdown:focus-within .tr-dropdown-content {
  display: block;
}

.tr-dropdown-content a {
  color: var(--text-primary);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.tr-dropdown-content a:hover {
  background-color: var(--surface-hover);
}

/* Viewer Container */
.tr-viewer-container {
  max-height: 600px;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.tr-viewer-container::-webkit-scrollbar {
  width: 8px;
}
.tr-viewer-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}
.tr-viewer-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

[data-theme="light"] .tr-viewer-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .tr-viewer-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
}

.tr-line {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.tr-timestamp {
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 0.9rem;
  min-width: 55px;
  user-select: none;
}

.tr-text {
  color: var(--text-primary);
  font-size: 1.05rem;
}

/* Hide timestamps mode */
.tr-viewer-content:not(.show-timestamps) .tr-timestamp {
  display: none;
}

.tr-viewer-content:not(.show-timestamps) .tr-line {
  display: inline;
  margin-bottom: 0;
}

.tr-viewer-content:not(.show-timestamps) .tr-text {
  display: inline;
  margin-right: 0.3rem;
}

@media (max-width: 768px) {
  .tr-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tr-toolbar-left, .tr-toolbar-right {
    justify-content: space-between;
  }
}
