/* OT Terminal — Application Header */

.ot-header {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  background: var(--ot-bg-panel);
  border-bottom: 1px solid var(--ot-border-subtle);
}

.ot-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ot-header__brand-mark {
  width: 26px;
  height: 26px;
  color: var(--ot-gold);
}

.ot-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ot-header__brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--ot-text-primary);
}

.ot-header__brand-sub {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--ot-text-tertiary);
  text-transform: uppercase;
}

.ot-header__divider {
  width: 1px;
  align-self: stretch;
  margin: 12px 0;
  background: var(--ot-border-subtle);
  flex: 0 0 auto;
}

.ot-header__product {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: var(--ot-radius-sm);
  background: var(--ot-gold-wash);
  border: 1px solid rgba(201, 163, 78, 0.35);
}

.ot-header__product-name {
  font-size: var(--ot-fs-sm);
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ot-gold-bright);
}

.ot-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 1 auto;
  overflow: hidden;
}

.ot-header__nav-link {
  padding: 7px 10px;
  border-radius: var(--ot-radius-sm);
  font-size: var(--ot-fs-sm);
  color: var(--ot-text-secondary);
  white-space: nowrap;
  transition: color var(--ot-transition-fast), background var(--ot-transition-fast);
}

.ot-header__nav-link:hover {
  color: var(--ot-text-primary);
  background: var(--ot-bg-panel-raised);
}

.ot-header__spacer {
  flex: 1 1 auto;
}

.ot-header__search {
  position: relative;
  flex: 0 1 260px;
  min-width: 140px;
}

.ot-header__search input {
  width: 100%;
  height: 32px;
  background: var(--ot-bg-input);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  padding: 0 32px 0 12px;
  font-size: var(--ot-fs-sm);
  color: var(--ot-text-primary);
  transition: border-color var(--ot-transition-fast);
}

.ot-header__search input::placeholder {
  color: var(--ot-text-tertiary);
}

.ot-header__search input:focus {
  border-color: var(--ot-gold-dim);
  outline: none;
}

.ot-header__search-icon {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ot-text-tertiary);
  pointer-events: none;
}

.ot-header__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--ot-fs-xs);
  color: var(--ot-text-secondary);
  white-space: nowrap;
  flex: 0 0 auto;
}

.ot-header__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ot-up);
  box-shadow: 0 0 0 3px var(--ot-up-dim);
}

.ot-header__status-dot.is-closed {
  background: var(--ot-down);
  box-shadow: 0 0 0 3px var(--ot-down-dim);
}

.ot-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.ot-header__user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--ot-border);
  transition: border-color var(--ot-transition-fast);
}

.ot-header__user:hover {
  border-color: var(--ot-border-strong);
}

.ot-header__user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ot-gold-wash-strong);
  color: var(--ot-gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.ot-header__user-caret {
  width: 12px;
  height: 12px;
  color: var(--ot-text-tertiary);
}

.ot-header__tagline {
  flex: 0 0 auto;
  text-align: right;
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.6px;
  color: var(--ot-gold-dim);
  text-transform: uppercase;
  font-weight: 600;
}

/* Symbol search results dropdown */
.ot-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 340px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--ot-bg-panel-raised);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.ot-search-results[hidden] {
  display: none;
}

/* Advanced Symbol Search phase — "Search Symbol · Panel N" hint shown
   at the top of the dropdown whenever Multi-Chart has more than one
   panel visible, so it's always clear which panel a selection lands
   in (never shown in single-chart layout — nothing to disambiguate). */
.ot-search-panel-hint {
  padding: 7px 12px;
  font-size: var(--ot-fs-xs);
  color: var(--ot-gold-bright);
  background: var(--ot-gold-wash);
  border-bottom: 1px solid var(--ot-border-subtle);
  white-space: nowrap;
}

.ot-search-filter-row {
  display: flex;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--ot-border-subtle);
}

.ot-search-filter-btn {
  padding: 3px 9px;
  font-size: 10px;
  border-radius: 999px;
  border: 1px solid var(--ot-border);
  color: var(--ot-text-secondary);
  background: transparent;
}

.ot-search-filter-btn:hover {
  border-color: var(--ot-border-strong);
  color: var(--ot-text-primary);
}

.ot-search-filter-btn.is-active {
  border-color: var(--ot-gold-dim);
  background: var(--ot-gold-wash);
  color: var(--ot-gold-bright);
}

.ot-search-section-label {
  padding: 7px 12px 3px;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ot-text-tertiary);
}

.ot-search-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: var(--ot-fs-sm);
  color: var(--ot-text-tertiary);
}

.ot-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.ot-search-result:hover,
.ot-search-result.is-highlighted {
  background: var(--ot-bg-panel);
}

.ot-search-result__symbol {
  font-weight: 700;
  font-size: var(--ot-fs-sm);
  width: 68px;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ot-search-result__meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.ot-search-result__name {
  color: var(--ot-text-secondary);
  font-size: var(--ot-fs-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ot-search-result__tags {
  color: var(--ot-text-tertiary);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ot-search-result__price {
  font-size: var(--ot-fs-xs);
  flex: 0 0 auto;
  white-space: nowrap;
}

.ot-search-result__price--none {
  font-size: 10px;
}

.ot-search-result__watchlist-add {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.ot-search-result__watchlist-add.is-added {
  color: var(--ot-up);
}
