/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/query_editor-9dd854d1.css");
@import url("/assets/minimal_theme-f163d127.css");
@import url("/assets/chart-07e1e2ba.css");
@import url("/assets/uplot-a7f50538.css");
@import url("/assets/dashboards-c59b24ea.css");

/* Navbar breadcrumb fixes */
/* Fix breadcrumb link colors in dark navbar (light mode) */
.navbar.is-dark .breadcrumb a {
  color: #fff;
  opacity: 0.9;
}

.navbar.is-dark .breadcrumb a:hover {
  color: #fff;
  opacity: 1;
}

.navbar.is-dark .breadcrumb .is-active a {
  color: #fff;
  opacity: 1;
}

/* Fix breadcrumb separator visibility in dark mode */
@media (prefers-color-scheme: dark) {
  .navbar .breadcrumb li + li::before {
    color: #e8e8e8 !important;
  }
}

/* Navbar tabs styling */
.navbar.is-dark .navbar-item.is-tab {
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid transparent;
}

.navbar.is-dark .navbar-item.is-tab:hover {
  color: #fff;
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.navbar.is-dark .navbar-item.is-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
  background-color: transparent;
}

/* Properties column styles for query results */
.properties-cell {
  width: 100%;
  max-width: 0;
  vertical-align: top;
  padding: 0.5rem 0.75rem !important;
}

.disclosure-cell {
  max-width: 0;
  vertical-align: top;
  padding: 0.5rem 0.75rem !important;
}

.properties-json {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: 1.4em;
}

/* Tighten table cell padding for query results */
#query_results .table td {
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  line-height: 1.4;
}

#query_results .table th {
  padding: 0.5rem 0.75rem;
}

#query_results .table td code,
#query_results .table td span {
  line-height: 1.4;
}

/* Compact JSON disclosure controls */
.disclosure-cell [data-controller="json-disclosure"] > div {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 0;
}

.disclosure-cell .button.is-small {
  padding: 0.125rem 0.25rem;
  height: auto;
  min-height: 0;
  margin-top: 0;
}

.disclosure-cell .button.is-small .icon {
  height: 1em;
  width: 1em;
}

/* JSON disclosure preview */
.json-preview {
  margin-top: 0.5rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  max-height: 400px;
  overflow: auto;
  white-space: pre;
}

@media (prefers-color-scheme: dark) {
  .json-preview {
    background-color: #1a1a1a;
    border-color: #363636;
  }
}

/* JSON syntax highlighting */
.json-key {
  color: #0451a5;
  font-weight: 600;
}

.json-string {
  color: #a31515;
}

.json-number {
  color: #098658;
}

.json-boolean {
  color: #0000ff;
  font-weight: 600;
}

.json-null {
  color: #808080;
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  .json-key {
    color: #9cdcfe;
  }

  .json-string {
    color: #ce9178;
  }

  .json-number {
    color: #b5cea8;
  }

  .json-boolean {
    color: #569cd6;
  }

  .json-null {
    color: #808080;
  }
}

/* Click-to-filter on event detail values */
.event-filter-trigger {
  background: none;
  border: 1px dashed transparent;
  border-radius: 3px;
  padding: 0 0.25rem;
  margin: -0.0625rem -0.25rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.event-filter-trigger:hover {
  background-color: rgba(50, 115, 220, 0.12);
  border-color: rgba(50, 115, 220, 0.4);
}

.event-filter-trigger:focus-visible {
  outline: 2px solid rgba(50, 115, 220, 0.6);
  outline-offset: 1px;
}

.event-filter-menu {
  position: fixed;
  z-index: 1000;
  min-width: 16rem;
  background-color: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(10, 10, 10, 0.12);
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.event-filter-menu-label {
  padding: 0.375rem 0.75rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 0.8125rem;
  color: #4a4a4a;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-filter-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}

.event-filter-menu-item:hover {
  background-color: #f5f5f5;
}

.event-filter-key-trigger {
  background: none;
  border: 1px dashed transparent;
  border-radius: 3px;
  padding: 0 0.25rem;
  margin: -0.0625rem -0.25rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.event-filter-key-trigger:hover {
  background-color: rgba(50, 115, 220, 0.12);
  border-color: rgba(50, 115, 220, 0.4);
}

.event-filter-key-trigger:focus-visible {
  outline: 2px solid rgba(50, 115, 220, 0.6);
  outline-offset: 1px;
}

.event-filter-menu-section {
  max-height: 60vh;
  overflow-y: auto;
}

.event-filter-menu-status {
  padding: 0.5rem 0.75rem;
  color: #7a7a7a;
  font-style: italic;
}

.event-filter-key-result {
  justify-content: space-between;
}

.event-filter-key-result-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 0.8125rem;
}

.event-filter-key-result-count {
  flex: 0 0 auto;
  margin-left: 0.75rem;
  padding: 0.0625rem 0.375rem;
  background-color: #f0f0f0;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #4a4a4a;
}

@media (prefers-color-scheme: dark) {
  .event-filter-trigger:hover,
  .event-filter-key-trigger:hover {
    background-color: rgba(120, 170, 255, 0.18);
    border-color: rgba(120, 170, 255, 0.5);
  }

  .event-filter-menu {
    background-color: #2a2a2a;
    border-color: #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .event-filter-menu-label {
    color: #d0d0d0;
    border-bottom-color: #404040;
  }

  .event-filter-menu-item:hover {
    background-color: #3a3a3a;
  }

  .event-filter-menu-status {
    color: #a0a0a0;
  }

  .event-filter-key-result-count {
    background-color: #404040;
    color: #d0d0d0;
  }
}
