/* /ftf/app/_shared/header.css — styles for the shared top header partial.
   Pages that include header.php should also link this stylesheet. */

.ftf-header {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-app);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-body);
}

/* Brand block */
.ftf-header .ftf-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; text-decoration: none; color: inherit; height: auto; min-height: 0; padding: 0; margin: 0; }
.ftf-header .ftf-brand-img { height: 27px; max-height: 27px; width: auto; display: block; flex: 0 0 auto; border-radius: 0; }
.ftf-header .ftf-brand-text { display: flex; flex-direction: column; line-height: 1.15; margin: 0; padding: 0; }
.ftf-header .ftf-brand-text .l1, .ftf-header .ftf-brand-text .l2 { display: block; font-size: 10px; line-height: 1.15; color: var(--text-muted); letter-spacing: 0.02em; font-weight: 500; }

/* Search */
.ftf-header .ftf-search { flex: 0 1 300px; max-width: 300px; position: relative; }
.ftf-header .ftf-search input {
  box-sizing: border-box; width: 100%; padding: 7px 56px 7px 32px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-primary); font-size: 12px;
  font-family: "JetBrains Mono", monospace;
}
.ftf-header .ftf-search input:focus { outline: none; border-color: var(--border-strong); }
.ftf-header .ftf-search input::placeholder { color: var(--text-disabled); }
.ftf-header .ftf-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-disabled); }
.ftf-header .ftf-search-go {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  padding: 3px 9px;
  background: var(--bg-app); border: 1px solid var(--border-strong); border-radius: 4px;
  color: var(--text-muted); font-size: 9px; font-weight: 600; letter-spacing: 0.1em;
  cursor: pointer; font-family: "Inter", system-ui, sans-serif;
}
.ftf-header .ftf-search-go:hover { color: var(--text-heading); border-color: var(--border-hover); }

/* Stock Filter button + other header buttons */
.ftf-header .ftf-header-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-body); font-size: 12px; font-weight: 500;
  text-decoration: none;
  cursor: pointer; flex-shrink: 0;
}
.ftf-header .ftf-header-btn:hover { border-color: var(--border-strong); color: var(--text-heading); }

/* Status pill (System Online) */
.ftf-header .ftf-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(96, 165, 250,0.25); background: rgba(96, 165, 250,0.05);
  color: var(--info); font-size: 11px; flex-shrink: 0; margin-left: auto;
}
.ftf-header .ftf-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--info); }

/* Meta strings (last updated, market data) */
.ftf-header .ftf-meta { font-size: 11px; color: var(--text-muted); font-family: "JetBrains Mono", monospace; white-space: nowrap; flex-shrink: 0; }
.ftf-header .ftf-meta-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--info); margin-right: 6px; vertical-align: middle; }

/* User pill */
.ftf-header .ftf-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 13px 3px 3px;
  background: linear-gradient(90deg, var(--accent-strong), #0891b2);
  border-radius: 999px;
  color: var(--text-on-accent); font-size: 12px; font-weight: 500;
  text-decoration: none; flex-shrink: 0;
}
.ftf-header .ftf-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-tint-15);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.ftf-header .ftf-login-link {
  padding: 6px 14px;
  background: var(--accent-hover); border-radius: 7px;
  color: var(--text-on-accent); font-size: 12px; font-weight: 600;
  text-decoration: none; flex-shrink: 0;
}
.ftf-header .ftf-login-link:hover { background: var(--accent-strong); }


/* User dropdown menu */
.ftf-header .ftf-user-menu-wrap { position: relative; flex-shrink: 0; }
.ftf-header .ftf-user { border: 0; font-family: inherit; cursor: pointer; }
.ftf-header .ftf-user-caret { opacity: 0.78; transition: transform 140ms ease; flex-shrink: 0; }
.ftf-header .ftf-user-menu-wrap.is-open .ftf-user-caret { transform: rotate(180deg); }
.ftf-header .ftf-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 164px;
  padding: 6px;
  background: var(--surface-overlay-strong);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 12px 30px var(--shadow-strong);
}
.ftf-header .ftf-user-menu-wrap.is-open .ftf-user-menu { display: block; }
.ftf-header .ftf-user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-body);
  font: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ftf-header .ftf-user-menu-item:hover,
.ftf-header .ftf-user-menu-item:focus-visible {
  background: var(--surface-tint-06);
  color: var(--text-heading);
  outline: none;
}
.ftf-header .ftf-user-menu-item-danger { color: var(--danger-text); }
.ftf-header .ftf-user-menu-item-danger:disabled { opacity: 0.65; cursor: wait; }
