/* =====================================================
   FAIR Data Station – Global Theme (Vaadin 25)
   ===================================================== */

html {
  /* Brand colours */
  --lumo-primary-color: #2563eb;
  --lumo-primary-color-50pct: rgba(37, 99, 235, 0.5);
  --lumo-primary-color-10pct: rgba(37, 99, 235, 0.1);
  --lumo-primary-text-color: #1e293b;
  --lumo-primary-contrast-color: #ffffff;

  /* Drawer */
  --vaadin-app-layout-drawer-width: 220px;
  --fairds-sidebar-bg: #0f172a;
  --fairds-sidebar-text: rgba(255, 255, 255, 0.7);
  --fairds-sidebar-text-hover: #ffffff;
  --fairds-sidebar-accent: #3b82f6;
}

/* ---- Header ---- */
#header {
  height: 60px;
  padding: 0 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

#header h1 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

/* ---- Drawer content ---- */
.drawer-layout {
  background: var(--fairds-sidebar-bg);
  height: 100%;
}

#logo {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#logo img {
  height: 36px;
  max-width: 160px;
  object-fit: contain;
}

/* ---- Menu tabs (drawer only) ---- */
.drawer-layout vaadin-tab {
  color: var(--fairds-sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 6px;
  margin: 1px 8px;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-layout vaadin-tab:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--fairds-sidebar-text-hover) !important;
}

.drawer-layout vaadin-tab[selected] {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
}

.drawer-layout vaadin-tab a,
.drawer-layout vaadin-tab a:link,
.drawer-layout vaadin-tab a:visited {
  color: inherit !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ---- Drawer footer ---- */
.drawer-footer {
  color: rgba(255, 255, 255, 0.85) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  font-size: 0.75rem;
  padding: 8px 16px;
}

.drawer-footer a,
.drawer-footer a:link,
.drawer-footer a:visited {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ---- Links (content area) ---- */
a:link {
  color: var(--lumo-primary-color);
  text-decoration: none;
}

a:visited {
  color: var(--lumo-primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Dark mode link overrides */
html[theme~="dark"] a:link,
html[theme~="dark"] a:visited {
  color: #93c5fd;
}

/* ---- Theme toggle button ---- */
.theme-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* ---- Memory footer (bottom-right) ---- */
.bottom-right-footer {
  position: fixed !important;
  bottom: 8px !important;
  right: 8px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  font-size: 0.75rem !important;
  color: #64748b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  z-index: 1000 !important;
  pointer-events: none !important;
}

html[theme~="dark"] .bottom-right-footer {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ---- Misc utilities ---- */
.aligncenter {
  text-align: center;
}

.centered-content {
  margin: 0 auto;
  max-width: 250px;
}

/* ---- Accordion borders ---- */
.accordion-investigation-studies {
  border: 2px solid #424242 !important;
}

.accordion-observation-assays {
  border: 2px solid #424242 !important;
}
