/* Shared Container and Toolbar Styles */
:root {
  --bg: #0a0a0a;
  --border: #2d2d2d;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #e5e5e5;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  align-items: flex-start; /* anchor to top to avoid vertical jumps */
  justify-content: center; /* still keep horizontal centering */
  height: 100vh;
  width: 100vw;
}

.container {
  max-width: 960px;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.combined-container {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 0.5rem;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.top-bar {
  padding: 0.4rem 0; /* flush horizontally */
  background: #111;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: flex-start;
  gap: 0.4rem;
}

.middle {
  flex: 1 1 auto;
  min-height: 0;
}

.bottom-bar {
  background: #111;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Menu Button and Dropdown */
.menu-container {
  position: relative;
  flex-shrink: 0;
}

.menu-btn {
  background: #0d6efd;
  border: 1px solid #444;
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  flex-shrink: 0;
}

.menu-btn:hover {
  background: #0b5ed7;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  min-width: 140px;
  display: none;
  margin-top: 0.25rem;
}

.menu-dropdown.show {
  display: block;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.menu-item:hover {
  background: #333;
  text-decoration: none;
  color: #fff;
}

.menu-item i {
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

/* Compact controls to match search height */
.top-bar select {
  height: 2rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
}

.top-bar button {
  height: 2rem;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Ensure inputs inside the top bar keep a consistent height (avoid resize on focus) */
.top-bar input[type="text"],
.top-bar input[type="search"] {
  height: 2rem;
  line-height: 1;
}

/* Ensure the menu button uses the same compact sizing */
.top-bar .menu-btn {
  padding: 0;
  width: 2rem;
  height: 2rem;
  min-width: 2rem; /* override 32px default */
}

/* Loader */
#loaderOverlay {
  position: absolute;
  top: 0; left: 0; right:0; bottom:0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.spinner {
  width:40px;height:40px;
  border:4px solid #666;
  border-top-color:#fff;
  border-radius:50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { 
  to { transform: rotate(360deg);} 
} 