.c-table {
  width: 100%;
}

.c-table table {
  width: 100%;
  border: 1px solid rgb(209 213 219);
}

.c-table thead {
  background-color: rgb(249 250 251);
  border: 1px solid rgb(209 213 219);
}
.c-table tbody {
  background-color: white;
  border-left: 1px solid rgb(209 213 219);
  border-right: 1px solid rgb(209 213 219);
}

.c-table > * + * {
  border-top: 1px solid rgb(209 213 219);
  border-bottom: 1px solid rgb(209 213 219);
}

.c-table tbody > tr + tr {
  border-top: 1px solid rgb(209 213 219);
  border-bottom: 1px solid rgb(209 213 219);
}

.c-table th {
  padding: 12px;
  text-align: left;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  font-weight: 500;
  color: #111827;
  vertical-align: top;
}

.c-table tr:hover {
  background-color: rgb(243 244 246);
}

.c-table td {
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 400;
  color: #111827;
  vertical-align: top;
}

.c-table td.align-middle {
  vertical-align: middle;
}

.c-table .c-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.c-table a {
  text-decoration: underline;
}

.c-table a:hover {
  text-decoration: none;
}

.c-link {
  text-decoration: underline;
  cursor: pointer;
}

.c-link:hover {
  text-decoration: none;
}

.c-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 20rem;
  max-width: 50rem;
}

.c-form.w-full {
  max-width: 100%;
}

.c-form input[type='email'],
.c-form input[type='text'],
.c-form input[type='date'],
.c-form input[type='file'],
.c-form input[type='url'],
.c-form select,
.c-form textarea {
  display: block;
  margin-top: 4px;
  padding: 8px;
  width: 100%;
  border-radius: 0.375rem;
  border-width: 1px;
  border-color: rgb(210 214 220);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
    var(--tw-ring-shadow, 0 0 #0000), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.c-form select {
  appearance: none;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  width: auto;
  padding-right: 40px;
}

.c-form input[type='date'] {
  appearance: auto;
  max-width: 136px;
}

.c-form textarea {
  min-height: 120px;
  field-sizing: content;
}

.c-form .field_with_errors label {
  color: red;
}

.c-form .field_with_errors input[type='email'],
.c-form .field_with_errors input[type='text'],
.c-form .field_with_errors input[type='file'],
.c-form .field_with_errors select,
.c-form .field_with_errors textarea {
  border-color: red;
}

.c-form-errors {
  color: red;
  font-weight: bold;
  border: 1px solid red;
  padding: 1rem;
  border-radius: 20px;
}

.c-form-errors strong {
  font-size: 1.125rem;
  line-height: 1.75rem;
  display: block;
  margin-bottom: 8px;
}

.c-form input[type='submit'],
.c-button {
  display: inline-block;
  vertical-align: top;
  border-radius: 16px;
  background-color: #ffffff;
  padding: 4px 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: black;
  border-color: 1px solid #d1d5db;
  box-shadow: 0 0 0 1px #d1d5db;
  transition: background-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
}

.c-form input[type='submit']:hover,
.c-button:hover {
  background-color: rgb(229 231 235);
}

.c-form input[type='submit'] {
  padding: 8px 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.c-heading {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  color: rgb(17 24 39);
  margin-bottom: 0.5rem;
}

.c-box {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgb(229 231 235);
  padding: 1.5rem;
}

/* Rouge syntax highlighting for JSON */
.json-display {
  background-color: #f8f8f8;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.4;
}

.json-display pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
  word-wrap: normal;
  overflow-x: auto;
}

.json-display .highlight {
  background: transparent;
}

/* Custom dropdown arrow for enrichment data only */
.enrichment-data details summary {
  list-style: none;
}

.enrichment-data details summary::-webkit-details-marker {
  display: none;
}

.enrichment-data details summary::marker {
  display: none;
}

.enrichment-data .dropdown-arrow {
  transition: transform 0.2s ease;
  font-size: 12px;
  color: #666;
}

.enrichment-data details[open] .dropdown-arrow {
  transform: rotate(90deg);
}

/* Rouge JSON syntax highlighting colors - matching admin theme */
.json-display .nl {
  color: #000000;
  font-weight: bold;
} /* keys */
.json-display .s2 {
  color: #006400;
} /* strings */
.json-display .mi {
  color: #007bff;
} /* numbers */
.json-display .p {
  color: #000000;
} /* punctuation */
.json-display .w {
  color: #000000;
  white-space: pre;
} /* whitespace */
.json-display .kc {
  color: #007bff;
  font-weight: bold;
} /* keywords (true/false/null) */

/* Featured Companies: auto-fade the inline "Updated" confirmation after a beat.
   Re-runs on each Turbo Stream row replace since the element is freshly added. */
.featured-saved {
  animation: featured-saved-fade 0.4s ease 2.6s forwards;
}

@keyframes featured-saved-fade {
  to {
    opacity: 0;
  }
}

/* Inline button spinner. Self-contained so it works regardless of the parent's
   display: admin.css's `.c-button { display: inline-block }` overrides the
   Tailwind `inline-flex` utility on the button, which left the spinner <span>
   as `display: inline` — so its width/height (w-3/h-3) were ignored and it
   collapsed to a non-animating sliver. This sizes and spins on its own. */
.c-spinner {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.375rem;
  vertical-align: -0.125em;
  border: 2px solid #d1d5db; /* gray-300 track */
  border-top-color: #4b5563; /* gray-600 head  */
  border-radius: 9999px;
  animation: c-spin 0.6s linear infinite;
}

/* Keep the JS-toggled `hidden` working: two classes outrank both `.c-spinner`
   and the Tailwind `.hidden` utility, so display:none wins while hidden. */
.c-spinner.hidden {
  display: none;
}

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

/* Rendered markdown (LLM output such as Company Highlights, assistant messages).
   Shared by the admin assistants page and the Featured Companies highlights column. */
.markdown-content {
  line-height: 1.7;
}

/* Sit flush inside compact containers (e.g. table cells) — no leading/trailing gap. */
.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content > :last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

.markdown-content h1 {
  font-size: 1.5em;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5em;
}

.markdown-content h2 {
  font-size: 1.3em;
}

.markdown-content h3 {
  font-size: 1.1em;
}

.markdown-content p {
  margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.5em 0;
  padding-left: 1.25em;
}

.markdown-content ul {
  list-style: disc;
}

.markdown-content ol {
  list-style: decimal;
}

.markdown-content li {
  margin: 0.25em 0;
}

.markdown-content code {
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.markdown-content pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1em 0;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.markdown-content blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1em;
  margin: 1em 0;
  color: #6b7280;
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.markdown-content table th,
.markdown-content table td {
  border: 1px solid #e5e7eb;
  padding: 0.75em;
  text-align: left;
}

.markdown-content table th {
  background-color: #f9fafb;
  font-weight: 600;
}

.markdown-content table tr:nth-child(even) {
  background-color: #f9fafb;
}

.markdown-content a {
  color: #3b82f6;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #2563eb;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2em 0;
}
