/* Quick Chrome — persistent header bar for deployed apps */

/* Header bar */
#quick-chrome-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  height: 56px;
  background: #0A0A0A;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-family: -apple-system, system-ui, sans-serif;
}

/* Push page content below the bar */
html.quick-chrome-active { padding-top: 56px !important; }
html.quick-chrome-active body { margin-top: 0 !important; }

/* Back to Quick link */
#quick-chrome-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #4a3aff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
  user-select: none;
}
#quick-chrome-back:hover {
  background: #5b4cff;
}
#quick-chrome-back .qc-arrow {
  font-size: 14px;
  line-height: 1;
}

/* App title in center */
#quick-chrome-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  pointer-events: none;
}

/* Comments pill */
#quick-chrome-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #4a3aff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  transition: background 0.15s;
  user-select: none;
}
#quick-chrome-pill:hover {
  background: #5b4cff;
}
#quick-chrome-pill .qc-logo {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
#quick-chrome-pill .qc-badge {
  background: #fff;
  color: #4a3aff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Slide-out panel */
#quick-chrome-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  z-index: 999998;
  background: #0a0a0a;
  border-left: 1px solid #222;
  font-family: -apple-system, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
}
#quick-chrome-panel.open {
  transform: translateX(0);
}

.qc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.qc-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
}
.qc-panel-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
}
.qc-panel-close:hover { color: #ccc; }

/* Reactions bar */
.qc-reactions {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid #222;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.qc-reaction-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #111;
  border: 1px solid #333;
  border-radius: 16px;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.1s;
}
.qc-reaction-btn:hover {
  border-color: #4a3aff;
  color: #ccc;
}
.qc-reaction-btn.reacted {
  background: rgba(74, 58, 255, 0.15);
  border-color: #4a3aff;
  color: #e0e0e0;
}
.qc-reaction-btn .qc-emoji { font-size: 14px; }
.qc-reaction-btn .qc-count { font-size: 11px; font-weight: 600; }

/* Comments list */
.qc-comments {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.qc-comments::-webkit-scrollbar { width: 4px; }
.qc-comments::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.qc-empty {
  text-align: center;
  color: #444;
  font-size: 13px;
  padding: 40px 20px;
}

.qc-comment {
  margin-bottom: 16px;
}
.qc-comment-reply {
  margin-left: 20px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.qc-comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.qc-comment-author {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
}
.qc-comment-time {
  font-size: 11px;
  color: #555;
}
.qc-comment-body {
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
  word-break: break-word;
}
.qc-comment-body .qc-mention {
  color: #4a3aff;
  font-weight: 500;
}
.qc-comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.qc-comment-action {
  background: none;
  border: none;
  color: #555;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.qc-comment-action:hover { color: #999; }

/* Comment input */
.qc-input-area {
  padding: 12px 20px;
  border-top: 1px solid #222;
  flex-shrink: 0;
  position: relative;
}
.qc-input-row {
  display: flex;
  gap: 8px;
}
.qc-input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 120px;
}
.qc-input:focus { border-color: #4a3aff; }
.qc-input::placeholder { color: #444; }

.qc-send-btn {
  background: #4a3aff;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  align-self: flex-end;
  white-space: nowrap;
}
.qc-send-btn:hover { background: #5b4cff; }
.qc-send-btn:disabled { opacity: 0.4; cursor: default; }

/* Reply form inline */
.qc-reply-form {
  margin-top: 8px;
  margin-left: 20px;
}
.qc-reply-form .qc-input {
  font-size: 12px;
  padding: 8px 10px;
  min-height: 32px;
}

/* Mention dropdown */
.qc-mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 20px;
  right: 20px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}
.qc-mention-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
}
.qc-mention-item:hover, .qc-mention-item.active {
  background: rgba(74, 58, 255, 0.1);
}
.qc-mention-item-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}
.qc-mention-item-name {
  font-weight: 600;
  color: #e0e0e0;
}
.qc-mention-item-email {
  color: #555;
  font-size: 11px;
  margin-left: auto;
}

/* App info footer */
.qc-app-info {
  padding: 10px 20px;
  border-top: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  flex-shrink: 0;
}
.qc-app-info a {
  color: #4a3aff;
  text-decoration: none;
}
.qc-app-info a:hover { text-decoration: underline; }

/* Overlay when panel is open */
#quick-chrome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999997;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#quick-chrome-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
