/* ═══════════════════════════════════════════════════════════════
   ShopBot Labs — Header Bar
   Full-width top bar with nav links + theme picker.
   ═══════════════════════════════════════════════════════════════ */

:root { --sb-topbar-h: 32px; }

.sb-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--sb-topbar-h);
  box-sizing: border-box;
  background: var(--t-bg-header, #252526);
  border-bottom: 1px solid var(--t-border, #333);
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  margin: 0;
}

/* Left: nav links */
.sb-topbar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sb-nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 12px;
  font-family: inherit;
  transition: color 0.12s;
}
.sb-nav-link:hover { color: #fff; }

/* Spacer pushes theme picker to the right */
.sb-topbar-spacer { flex: 1; }

/* Right: theme picker */
.sb-tp-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sb-tp-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-right: 2px;
  font-size: 10px;
}

.sb-tp-btn {
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.sb-tp-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sb-tp-btn.active {
  background: var(--t-accent, #569cd6);
  color: var(--t-accent-text, #fff);
  border-color: var(--t-accent, #569cd6);
  font-weight: 700;
}

/* ── Per-theme header overrides ── */

/* SB Light: light gray header, dark text */
.theme-shopbot-light .sb-topbar { background: #e0e0e0 !important; border-bottom-color: #ccc; }
.theme-shopbot-light .sb-nav-link { color: #444; }
.theme-shopbot-light .sb-nav-link:hover { color: #000; }
.theme-shopbot-light .sb-tp-label { color: #888; }
.theme-shopbot-light .sb-tp-btn {
  border: 1px solid #aaa; color: #444; background: #fff;
}
.theme-shopbot-light .sb-tp-btn:hover { background: #ddd; color: #111; }
.theme-shopbot-light .sb-tp-btn.active { background: #333; color: #fff; border-color: #333; }

/* SB Color: rainbow gradient */
.theme-shopbot-color .sb-topbar {
  background: var(--t-rainbow-gradient, #d05820) !important;
  border-bottom: 2px solid #222;
}
.theme-shopbot-color .sb-nav-link { color: rgba(255,255,255,0.9); }
.theme-shopbot-color .sb-tp-label { color: #fff; }
.theme-shopbot-color .sb-tp-btn {
  border: 1px solid rgba(255,255,255,0.5); color: #fff; background: rgba(0,0,0,0.2);
}
.theme-shopbot-color .sb-tp-btn:hover { background: rgba(0,0,0,0.4); color: #fff; }
.theme-shopbot-color .sb-tp-btn.active { background: #fff; color: #222; border-color: #fff; }

/* ShopBot 3: faux leather binding */
.theme-shopbot3 .sb-topbar {
  background: var(--t-bg-header) !important;
  border-bottom: 2px solid #5a3010;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.theme-shopbot3 .sb-nav-link { color: rgba(255,240,200,0.9); }
.theme-shopbot3 .sb-tp-label { color: rgba(255,220,160,0.7); }
.theme-shopbot3 .sb-tp-btn { border-color: rgba(255,210,140,0.35); color: rgba(255,240,200,0.85); background: rgba(0,0,0,0.15); }
.theme-shopbot3 .sb-tp-btn:hover { background: rgba(0,0,0,0.3); color: #fff; }
.theme-shopbot3 .sb-tp-btn.active { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.5); }

/* ── Feedback button ── */
.sb-feedback-btn {
  padding: 3px 12px;
  border: 2px solid rgba(255,200,50,0.7);
  border-radius: 4px;
  background: rgba(255,200,50,0.15);
  color: #ffd040;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-right: 10px;
  letter-spacing: 0.02em;
}
.sb-feedback-btn:hover { background: rgba(255,200,50,0.3); color: #ffe070; border-color: #ffd040; }

/* Light theme overrides */
.theme-shopbot-light .sb-feedback-btn { border: 2px solid #d08020; color: #b06800; background: #fff4e0; font-weight: 700; }
.theme-shopbot-light .sb-feedback-btn:hover { background: #ffe8c0; color: #904800; }

/* ── Feedback modal ── */
.sb-feedback-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.sb-feedback-overlay.visible { display: flex; }

.sb-feedback-modal {
  background: #2a2a2e;
  border: 1px solid #555;
  border-radius: 10px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}

.sb-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #333;
  border-bottom: 1px solid #555;
  font-size: 14px;
  font-weight: 600;
  color: #eee;
}

.sb-feedback-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.sb-feedback-close:hover { color: #fff; }

.sb-feedback-body { padding: 16px; }

.sb-feedback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sb-feedback-row label {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}
.sb-feedback-row select {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #1a1a1e;
  color: #ddd;
  font-size: 13px;
}

.sb-feedback-body textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #555;
  border-radius: 6px;
  background: #1a1a1e;
  color: #ddd;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}
.sb-feedback-body textarea:focus {
  outline: none;
  border-color: #7a7;
}

.sb-feedback-contact {
  margin-top: 10px;
}
.sb-feedback-contact p {
  font-size: 11px;
  color: #888;
  margin: 0 0 6px 0;
}
.sb-feedback-contact-row {
  display: flex;
  gap: 8px;
}
.sb-feedback-contact-row input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #1a1a1e;
  color: #ddd;
  font-size: 12px;
  font-family: inherit;
}
.sb-feedback-contact-row input:focus {
  outline: none;
  border-color: #7a7;
}

.sb-feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.sb-feedback-cancel,
.sb-feedback-submit {
  padding: 6px 18px;
  border-radius: 5px;
  border: 1px solid #555;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.sb-feedback-cancel {
  background: transparent;
  color: #aaa;
}
.sb-feedback-cancel:hover { color: #fff; }
.sb-feedback-submit {
  background: #4a8;
  color: #fff;
  border-color: #4a8;
}
.sb-feedback-submit:hover { background: #5b9; }
.sb-feedback-submit:disabled { opacity: 0.5; cursor: wait; }

.sb-feedback-status {
  margin-top: 8px;
  font-size: 12px;
  min-height: 1.2em;
}
