/* app.css — Logos-branded styles */

/* ------------------------------------------------------------------ */
/* CSS custom properties (Logos design tokens)                         */
/* ------------------------------------------------------------------ */

:root {
  --color-forest:   #0E2618;
  --color-sage:     #4E635E;
  --color-parchment:#E2E0C9;
  --color-gray:     #E5E5E5;
  --color-warmgray: #DDDED8;
  --color-coral:    #E46962;
  --color-orange:   #FA7B17;
  --color-muted:    #808C78;
  --color-teal:     #0C2B2D;
  --color-ink:      #111520;

  --font-heading: 'Times New Roman', Times, Georgia, serif;
  --font-display: 'Gowun Batang', Georgia, serif;
  --font-body:    Arial, Helvetica, sans-serif;
  --font-code:    'Fira Code', Consolas, 'Courier New', monospace;
}

/* ------------------------------------------------------------------ */
/* Base                                                                 */
/* ------------------------------------------------------------------ */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------ */
/* Form inputs                                                          */
/* ------------------------------------------------------------------ */

.logos-input {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(78, 99, 94, 0.4);
  border-radius: 6px;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--color-forest);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.logos-input::placeholder {
  color: var(--color-muted);
}

.logos-input:focus {
  border-color: var(--color-coral);
  box-shadow: 0 0 0 2px rgba(228, 105, 98, 0.2);
}

/* ------------------------------------------------------------------ */
/* Scrollbar styling (WebKit)                                           */
/* ------------------------------------------------------------------ */

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-sage);
  border-radius: 3px;
  opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* ------------------------------------------------------------------ */
/* Drag & drop                                                          */
/* ------------------------------------------------------------------ */

.draggable-row {
  cursor: grab;
}
.draggable-row:active {
  cursor: grabbing;
}

.drag-source {
  opacity: 0.35;
  transform: scale(0.98);
  transition: opacity 0.15s, transform 0.15s;
}

.drop-indicator {
  height: 3px;
  background: var(--color-coral);
  border-radius: 2px;
  pointer-events: none;
  margin: -1.5px 0;
  position: relative;
  z-index: 10;
}

/* ------------------------------------------------------------------ */
/* Pipeline row hover / active states                                   */
/* ------------------------------------------------------------------ */

.pipeline-row {
  transition: background-color 0.12s, border-color 0.12s, transform 0.1s;
}

.pipeline-row:active {
  transform: scale(0.997);
}

/* ------------------------------------------------------------------ */
/* Detail panel animation                                               */
/* ------------------------------------------------------------------ */

.detail-panel {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------------ */
/* Chevron rotation                                                     */
/* ------------------------------------------------------------------ */

[id^="chevron-"] {
  transition: transform 0.2s ease;
}
[id^="chevron-"].rotate-180 {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------ */
/* Markdown body (Logos dark prose)                                     */
/* ------------------------------------------------------------------ */

.markdown-body {
  color: var(--color-forest);
  line-height: 1.65;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: var(--font-heading);
  color: var(--color-forest);
  font-weight: 700;
  margin-top: 1.4em;
  margin-bottom: 0.45em;
  line-height: 1.3;
}

.markdown-body h1 { font-size: 1.2rem; }
.markdown-body h2 { font-size: 1.05rem; }
.markdown-body h3 { font-size: 0.95rem; }

.markdown-body p {
  margin-top: 0;
  margin-bottom: 0.85em;
}

.markdown-body a {
  color: var(--color-coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.markdown-body a:hover {
  color: var(--color-orange);
}

.markdown-body code {
  background: rgba(78, 99, 94, 0.12);
  border: 1px solid rgba(78, 99, 94, 0.25);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-size: 0.82em;
  font-family: var(--font-code);
  color: var(--color-coral);
}

.markdown-body pre {
  background: rgba(14, 38, 24, 0.06);
  border: 1px solid rgba(78, 99, 94, 0.25);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1em;
}

.markdown-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--color-forest);
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5em;
  margin-bottom: 0.85em;
}

.markdown-body ul { list-style-type: disc; }
.markdown-body ol { list-style-type: decimal; }
.markdown-body ul ul { list-style-type: circle; }
.markdown-body ul ul ul { list-style-type: square; }

.markdown-body li {
  margin-bottom: 0.25em;
}

.markdown-body li input[type="checkbox"] {
  margin-right: 0.4em;
  accent-color: var(--color-coral);
}

.markdown-body blockquote {
  border-left: 2px solid var(--color-sage);
  padding-left: 1em;
  color: var(--color-muted);
  margin-left: 0;
  margin-bottom: 0.85em;
  font-style: italic;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid rgba(78, 99, 94, 0.4);
  margin: 1.4em 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 0.85rem;
}

.markdown-body th {
  background: rgba(78, 99, 94, 0.15);
  color: var(--color-sage);
  text-align: left;
  padding: 0.45em 0.7em;
  border: 1px solid rgba(78, 99, 94, 0.25);
  font-weight: 600;
  font-family: var(--font-body);
}

.markdown-body td {
  padding: 0.45em 0.7em;
  border: 1px solid rgba(78, 99, 94, 0.15);
}

.markdown-body tr:nth-child(even) td {
  background: rgba(78, 99, 94, 0.06);
}

/* ------------------------------------------------------------------ */
/* Drag handle                                                           */
/* ------------------------------------------------------------------ */

.drag-handle {
  font-size: 1.1rem;
  letter-spacing: -1px;
  line-height: 1;
  display: inline-block;
  cursor: grab;
  user-select: none;
  color: var(--color-sage);
}
.drag-handle:hover {
  color: var(--color-muted);
}
.drag-handle:active {
  cursor: grabbing;
}

/* ------------------------------------------------------------------ */
/* Code elements                                                        */
/* ------------------------------------------------------------------ */

code {
  font-family: var(--font-code);
}

/* ------------------------------------------------------------------ */
/* Animations                                                           */
/* ------------------------------------------------------------------ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#app-content > * {
  animation: fadeIn 0.2s ease-out;
}

#settings-modal:not(.hidden) {
  animation: fadeIn 0.15s ease-out;
}

#settings-modal:not(.hidden) > div:last-child {
  animation: slideDown 0.2s ease-out;
}

/* ------------------------------------------------------------------ */
/* Loading spinner                                                      */
/* ------------------------------------------------------------------ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

/* ------------------------------------------------------------------ */
/* Rank number (01, 02, 03 — Logos section numbering style)            */
/* ------------------------------------------------------------------ */

.rank-number {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  text-align: left;
}

/* ------------------------------------------------------------------ */
/* Section dividers                                                     */
/* ------------------------------------------------------------------ */

.logos-divider {
  border: none;
  border-top: 1px solid rgba(78, 99, 94, 0.35);
}

/* ------------------------------------------------------------------ */
/* Responsive tweaks                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  #app-content {
    padding: 1rem;
  }
}
