/**
 * ANSI Color CSS for Fight Logs
 *
 * Matches the terminal color palette used in the game.
 */

/* ANSI foreground colors - black remapped to grey for dark backgrounds */
.ansi-black-fg { color: #888888; }
.ansi-red-fg { color: #cc0000; }
.ansi-green-fg { color: #4e9a06; }
.ansi-yellow-fg { color: #c4a000; }
.ansi-blue-fg { color: #3465a4; }
.ansi-magenta-fg { color: #75507b; }
.ansi-cyan-fg { color: #06989a; }
.ansi-white-fg { color: #d3d7cf; }

/* ANSI bright foreground colors */
.ansi-bright-black-fg { color: #555753; }
.ansi-bright-red-fg { color: #ef2929; }
.ansi-bright-green-fg { color: #8ae234; }
.ansi-bright-yellow-fg { color: #fce94f; }
.ansi-bright-blue-fg { color: #729fcf; }
.ansi-bright-magenta-fg { color: #ad7fa8; }
.ansi-bright-cyan-fg { color: #34e2e2; }
.ansi-bright-white-fg { color: #eeeeec; }

/* ANSI background colors */
.ansi-black-bg { background-color: #000000; }
.ansi-red-bg { background-color: #cc0000; }
.ansi-green-bg { background-color: #4e9a06; }
.ansi-yellow-bg { background-color: #c4a000; }
.ansi-blue-bg { background-color: #3465a4; }
.ansi-magenta-bg { background-color: #75507b; }
.ansi-cyan-bg { background-color: #06989a; }
.ansi-white-bg { background-color: #d3d7cf; }

/* Text styles */
.ansi-bold { font-weight: bold; }
.ansi-dim { opacity: 0.7; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }

/* Fight log container */
.fight-log {
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1.5;
  background-color: #0a0a0a;
  color: #00ff00;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #333;
  max-height: 600px;
  overflow-y: auto;
}

/* Log list styles */
.log-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.log-table th,
.log-table td {
  padding: 0.5em 1em;
  text-align: left;
  border-bottom: 1px solid #333;
}

.log-table th {
  color: #00ff00;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.9em;
}

.log-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.log-row:hover {
  background-color: #1a1a1a;
}

/* Result status colors */
.victory { color: #4e9a06; }
.defeat { color: #cc0000; }
.fled { color: #c4a000; }
.timeout { color: #888888; }

/* Log viewer */
.log-viewer {
  margin: 1em 0;
}

.log-viewer-header {
  margin-bottom: 1em;
}

.log-viewer-header h2 {
  margin-top: 0.5em;
}

.back-button {
  background: #333;
  color: #00ff00;
  border: 1px solid #00ff00;
  padding: 0.5em 1em;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.back-button:hover {
  background: #444;
}

/* Loading and error states */
.loading {
  color: #888;
  font-style: italic;
}

.error {
  color: #cc0000;
}

/* Hidden utility class */
.hidden {
  display: none !important;
}
