@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --phase-rgb: 16, 185, 129;
  --phase-text-rgb: 167, 243, 208;
}

/* Font import - necessary for custom font */
body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.app-phase-poliai {
  --phase-rgb: 6, 182, 212;
  --phase-text-rgb: 165, 243, 252;
}

.app-phase-transcription {
  --phase-rgb: 16, 185, 129;
  --phase-text-rgb: 167, 243, 208;
}

.app-phase-sentiment {
  --phase-rgb: 59, 130, 246;
  --phase-text-rgb: 191, 219, 254;
}

.app-phase-audio {
  --phase-rgb: 168, 85, 247;
  --phase-text-rgb: 233, 213, 255;
}

.app-phase-openface {
  --phase-rgb: 132, 204, 22;
  --phase-text-rgb: 236, 252, 203;
}

.app-phase-results {
  --phase-rgb: 100, 116, 139;
  --phase-text-rgb: 226, 232, 240;
}

/* Shared page title/subtitle styles */
.app-page-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: rgb(255 255 255);
}

@media (min-width: 1024px) {
  .app-page-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

.app-page-subtitle {
  margin-top: 0.75rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.75rem;
  color: rgb(163 163 163);
}

.app-page-subtitle--single-line {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1023px) {
  .app-page-subtitle--single-line {
    white-space: normal;
  }
}

/* Shared breadcrumb styles for all pages */
.app-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: rgb(163 163 163);
}

.app-breadcrumb > a,
.app-breadcrumb > span {
  max-width: min(36ch, 100%);
  min-width: 0;
}

.app-breadcrumb-link {
  border: 1px solid rgba(82, 82, 82, 0.8);
  background: rgba(10, 10, 10, 0.55);
  padding: 0.2rem 0.55rem;
  color: rgb(212 212 212);
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.app-breadcrumb-link:hover {
  border-color: rgba(115, 115, 115, 0.95);
  color: rgb(245 245 245);
  background: rgba(23, 23, 23, 0.7);
}

.app-breadcrumb-separator {
  color: rgb(82 82 82);
}

.app-breadcrumb-current {
  border: 1px solid rgba(var(--phase-rgb), 0.45);
  background: rgba(var(--phase-rgb), 0.12);
  padding: 0.2rem 0.55rem;
  font-weight: 600;
  color: rgb(var(--phase-text-rgb));
  text-decoration: none;
}

.app-breadcrumb-context {
  border: 1px solid rgba(82, 82, 82, 0.85);
  background: rgba(38, 38, 38, 0.4);
  padding: 0.2rem 0.55rem;
  color: rgb(212 212 212);
  text-decoration: none;
}

.app-breadcrumb-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Shared info cards for repeated analysis metadata blocks */
.app-info-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .app-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .app-info-grid--lg-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-info-grid--lg-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-info-grid--lg-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-info-grid--lg-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.app-info-card {
  border: 1px solid rgba(38, 38, 38, 0.8);
  background: rgba(23, 23, 23, 0.6);
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.app-info-label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(163 163 163);
}

.app-info-value {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: rgb(212 212 212);
  overflow-wrap: anywhere;
}

.app-info-value--truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-info-value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Shared workflow panel layout */
.app-stage-panel {
  border: 1px solid rgba(38, 38, 38, 0.8);
  background: rgba(10, 10, 10, 0.8);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.35),
    0 10px 15px -10px rgba(0, 0, 0, 0.25);
}

.app-stage-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.app-stage-header-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.app-stage-kicker {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgb(115 115 115);
}

.app-stage-description {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55rem;
  color: rgb(163 163 163);
}

.app-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.app-stage-results {
  padding: 1rem;
}

.app-stage-results-card {
  border: 1px solid rgba(38, 38, 38, 0.8);
  background: rgba(23, 23, 23, 0.45);
  padding: 1rem;
}

.app-action-panel {
  border: 1px solid rgba(38, 38, 38, 0.8);
  background: rgba(10, 10, 10, 0.8);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.35),
    0 10px 15px -10px rgba(0, 0, 0, 0.25);
}

.app-action-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.app-action-copy {
  min-width: 0;
}

.app-action-title {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgb(115 115 115);
}

.app-action-description {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55rem;
  color: rgb(163 163 163);
}

.app-action-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
}

.app-phase-button {
  border: 1px solid rgba(var(--phase-rgb), 0.5);
  background: rgba(var(--phase-rgb), 0.12);
  color: rgb(var(--phase-text-rgb));
}

.app-phase-button:visited {
  color: rgb(var(--phase-text-rgb));
}

.app-phase-button:hover {
  border-color: rgba(var(--phase-rgb), 0.75);
  background: rgba(var(--phase-rgb), 0.22);
  color: rgb(var(--phase-text-rgb));
}

.app-action-panel--final {
  width: 100%;
}

.app-action-content--final {
  gap: 1.25rem;
}

.app-action-cta--final {
  min-width: 15rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (min-width: 1024px) {
  .app-stage-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .app-action-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .app-action-content--final .app-action-copy {
    max-width: calc(100% - 17rem);
  }
}

/* Custom scrollbar styles - cannot be replaced with Tailwind */
#video-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#video-list::-webkit-scrollbar {
  width: 6px;
}

#video-list::-webkit-scrollbar-track {
  background: transparent;
}

#video-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
}

#video-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Custom scrollbar styles for logs panel - cannot be replaced with Tailwind */
#logs-panel pre {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#logs-panel pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#logs-panel pre::-webkit-scrollbar-track {
  background: transparent;
}

#logs-panel pre::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
}

#logs-panel pre::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Instance logs container scrollbar */
#instance-logs {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#instance-logs::-webkit-scrollbar {
  width: 6px;
}

#instance-logs::-webkit-scrollbar-track {
  background: transparent;
}

#instance-logs::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
}

#instance-logs::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Log line styles - minimal CSS, styling done with Tailwind classes in JavaScript */
.log-line {
  word-wrap: break-word;
}
