/* =====================================================
   dc-nav.css — DentCast Shared Navigation
   Topbar · Toolbar Drawer · Radar Overlay
   Uses CSS variables defined in dc-theme.css.
   index.html has its own inline version.
===================================================== */

/* ── Reserve space for the fixed topbar (57px tall) ── */
body:has(.dc-topbar) {
  padding-top: 57px !important;
  margin-top: 0 !important;
}

/* =====================================================
   TOP BAR
===================================================== */
.dc-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  background: var(--surface, #ffffff);
  border-bottom: 1px solid var(--border, rgba(2,35,96,.10));
  box-shadow: 0 1px 8px rgba(2,35,96,.06);
  transition: background var(--tr2, .26s), border-color var(--tr2, .26s);
  gap: 10px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] .dc-topbar {
  box-shadow: 0 1px 8px rgba(0,0,0,.20);
}

.dc-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-f, 999px);
  background: var(--surface2, #f4f6fb);
  border: 1px solid var(--border, rgba(2,35,96,.10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--tr, .17s);
  color: var(--txt2, #4a5f85);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.dc-topbar-btn:active {
  transform: scale(.88);
  background: var(--surface3, #eaecf5);
}

.dc-topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.dc-topbar-brand-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--pr, #022360);
  letter-spacing: -.3px;
  transition: color var(--tr2, .26s);
  line-height: 1.2;
}

.dc-topbar-brand-sub {
  font-size: .70rem;
  color: var(--ac, #0b5fff);
  text-decoration: none;
  transition: opacity var(--tr, .17s);
  opacity: .8;
  line-height: 1.3;
}

.dc-topbar-brand-sub:active { opacity: .5; }

/* =====================================================
   TOOLBAR DRAWER
===================================================== */
.dc-toolbar-drawer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  background: var(--surface2, #f4f6fb);
  border-bottom: 1px solid var(--border, rgba(2,35,96,.10));
  transition: max-height .28s cubic-bezier(.4,0,.2,1),
              opacity .22s ease;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 199;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.dc-toolbar-drawer.open {
  max-height: 80px;
  opacity: 1;
}

.dc-toolbar-drawer-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dc-toolbar-drawer-inner::-webkit-scrollbar { display: none; }

.dc-toolbar-drawer-label {
  font-size: .68rem;
  font-weight: 800;
  color: var(--txt3, #8a9cbe);
  white-space: nowrap;
  padding-left: 10px;
  border-left: 1px solid var(--border, rgba(2,35,96,.10));
  margin-left: 6px;
  flex-shrink: 0;
}

.dc-drawer-tool-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--txt, #0a1a33);
  flex-shrink: 0;
  transition: background var(--tr, .17s);
  border-radius: var(--r-sm, 10px);
  -webkit-tap-highlight-color: transparent;
}

.dc-drawer-tool-seg:active {
  background: rgba(var(--pr-rgb, 2,35,96), .06);
}

.dc-drawer-tool-ico { font-size: 20px; line-height: 1; }

.dc-drawer-tool-txt {
  font-size: 11px;
  font-weight: 800;
  color: var(--txt2, #4a5f85);
  white-space: nowrap;
}

/* =====================================================
   RADAR OVERLAY
===================================================== */
.radar-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg, #f0f2f5);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
}

.radar-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

body.dc-radar-mode { overflow: hidden; }

.radar-overlay-header {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  background: var(--surface, #ffffff);
  border-bottom: 1px solid var(--border, rgba(2,35,96,.10));
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: background var(--tr2, .26s);
}

.radar-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: var(--txt2, #4a5f85);
  cursor: pointer;
  line-height: 1;
  padding: 0 0 0 14px;
  transition: color var(--tr, .17s);
}

.radar-close-btn:hover { color: #ff4646; }

.radar-header-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--txt, #0a1a33);
  flex-grow: 1;
}

.radar-overlay-body {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.radar-search-box { margin-bottom: 18px; }

#dcRadarInput {
  width: 100%;
  padding: 12px 18px;
  font-size: 15px;
  border: 2px solid rgba(var(--ac-rgb, 11,95,255), .30);
  border-radius: var(--r-f, 999px);
  outline: none;
  background: var(--surface, #ffffff);
  color: var(--txt, #0a1a33);
  box-shadow: 0 3px 12px rgba(var(--ac-rgb, 11,95,255), .06);
  transition: all var(--tr, .17s);
  font-family: inherit;
  box-sizing: border-box;
  direction: rtl;
}

#dcRadarInput:focus {
  border-color: rgba(var(--ac-rgb, 11,95,255), .60);
  box-shadow: 0 4px 18px rgba(var(--ac-rgb, 11,95,255), .15);
}

.radar-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radar-initial-msg, .radar-no-results {
  text-align: center;
  color: var(--txt3, #8a9cbe);
  margin-top: 30px;
  font-size: 13.5px;
}

.radar-result-item {
  background: var(--card-bg, #ffffff);
  border-radius: var(--r-md, 14px);
  padding: 13px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--card-border, rgba(2,35,96,.09));
  transition: all var(--tr, .17s);
  display: block;
  box-shadow: var(--card-sh, 0 1px 3px rgba(2,35,96,.07));
}

.radar-result-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--card-sh2, 0 4px 18px rgba(2,35,96,.13));
}

.radar-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ac, #0b5fff);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.radar-item-url {
  font-size: 11px;
  color: #27ae60;
  margin-bottom: 5px;
  direction: ltr;
  text-align: left;
}

[data-theme="dark"] .radar-item-url { color: #4caf7d; }

.radar-item-desc {
  font-size: 12px;
  color: var(--txt2, #4a5f85);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
