/* ============================================
   IDE/Terminal Aesthetic Styles
   ============================================ */

:root {
  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

    --ide-folder: #dcb67a;
  --ide-schema: #4ec9b0;
  --ide-config: #ce9178;
  --ide-close: #ff5f56;
  --ide-min: #ffbd2e;
  --ide-max: #27c93f;
  --ide-bg: #050505;

  --ide-surface: #252526;
  --ide-panel: #333333;
  --ide-border: #3c3c3c;
  --ide-active: rgba(95, 209, 176, 0.12);
  --ide-active-border: #5fd1b0;
  --ide-text: #cccccc;
  --ide-dim: #a8a8a8;
  --ide-highlight: #ffffff;
  --ide-keyword: #569cd6;
  --ide-string: #ce9178;
  --ide-statusbar-bg: var(--ide-active-border);
  --ide-statusbar-fg: #ffffff; /* Fixed contrast */
  --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Shell Tokens - default to dark mode values */
  --shell-bg: #030507;
  --shell-surface: #11161d;
  --shell-surface-2: #0f141b;
  --shell-surface-elevated: #151c25;
  --shell-card: #11161d;
  --shell-card-hover: #151c25;
  --shell-border: #243041;
  --shell-border-strong: #334155;
  --shell-text: #edf2f7;
  --shell-muted: #94a3b8;
  --shell-primary: #5fd1b0;
  --shell-primary-dim: rgba(95, 209, 176, 0.12);
  --shell-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.28);

  /* Portal Font Overrides (Match design/DESIGN.md) */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.light {
  --ide-bg: #ffffff;
  --ide-surface: #f3f3f3;
  --ide-panel: #e8e8e8;
  --ide-border: #cccccc;
  --ide-folder: #b8860b;
  --ide-schema: #008b8b;
  --ide-config: #a0522d;
  --ide-active: rgba(15, 118, 110, 0.08);
  --ide-active-border: #0f766e;
  --ide-text: #333333;
  --ide-dim: #b0b0b0;
  --ide-highlight: #000000;
  --ide-keyword: #005cc5;
  --ide-string: #d73a49;
  --ide-statusbar-bg: var(--ide-active-border);
  --ide-statusbar-fg: #ffffff; /* Fixed contrast */

  /* Shell Tokens - light mode overrides */
  --shell-bg: #f8fafc;
  --shell-surface: #ffffff;
  --shell-surface-2: #f8fafc;
  --shell-surface-elevated: #eef2f7;
  --shell-card: #ffffff;
  --shell-card-hover: #f8fafc;
  --shell-border: #e2e8f0;
  --shell-border-strong: #cbd5e1;
  --shell-text: #0f172a;
  --shell-muted: #475569;
  --shell-primary: #0f766e;
  --shell-primary-dim: rgba(15, 118, 110, 0.08);
  --shell-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
}

/* Hide scrollbar for editor-tabs */
.editor-tabs::-webkit-scrollbar {
  display: none;
}
.editor-tabs {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* MONOKAI THEME */
.theme-monokai {
  --ide-bg: #272822;
  --ide-surface: #1e1f1c;
  --ide-panel: #1e1f1c;
  --ide-border: #414339;
  --ide-active: #49483e;
  --ide-active-border: #a6e22e;
  --ide-text: #f8f8f2;
  --ide-highlight: #ffffff;
  --ide-keyword: #f92672;
  --ide-string: #e6db74;
  --ide-statusbar-bg: #007acc;
  --ide-statusbar-fg: #ffffff;
  --shell-bg: #272822;
  --shell-text: #f8f8f2;
  --shell-muted: #75715e;
  --shell-border: #414339;
  --shell-active: #49483e;
  --shell-accent: #a6e22e;
  --shell-accent-text: #272822;
  --shell-accent-hover: #a6e22e;
}

/* DRACULA THEME */
.theme-dracula {
  --ide-bg: #282a36;
  --ide-surface: #282a36;
  --ide-panel: #21222c;
  --ide-border: #44475a;
  --ide-active: #44475a;
  --ide-active-border: #ff79c6;
  --ide-text: #f8f8f2;
  --ide-highlight: #8be9fd;
  --ide-keyword: #ff79c6;
  --ide-string: #f1fa8c;
  --ide-statusbar-bg: var(--ide-active-border);
  --ide-statusbar-fg: #282a36;
  --shell-bg: #282a36;
  --shell-text: #f8f8f2;
  --shell-muted: #6272a4;
  --shell-border: #44475a;
  --shell-active: #44475a;
  --shell-accent: #ff79c6;
  --shell-accent-text: #282a36;
  --shell-accent-hover: #ff79c6;
}

html, body {
  margin: 0; padding: 0; height: 100%; width: 100%;
  position: fixed; top: 0; left: 0;
  overflow: hidden; background: var(--ide-bg); color: var(--ide-text);
  font-family: var(--font-code);
}

::selection { background: rgba(0, 122, 204, 0.4); }

*:focus-visible {
  outline: 2px solid var(--ide-active-border);
  outline-offset: -2px;
}

.ide-layout {
  display: flex; flex-direction: column; height: 100%; width: 100%;
}

/* ============ TITLEBAR ============ */
.ide-titlebar {
  height: 35px; background: var(--ide-panel); border-bottom: 1px solid var(--ide-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  flex-shrink: 0; font-size: 12px; -webkit-user-select: none; user-select: none;
}
.window-controls { display: flex; gap: 8px; }
.window-controls .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.close { background: var(--ide-close); } .dot.min { background: var(--ide-min); } .dot.max { background: var(--ide-max); }

.title-text {
  color: var(--ide-dim); flex: 1; text-align: center;
}
.title-text span { color: var(--ide-highlight); font-weight: 600; }

.title-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .mobile-menu-btn {
  background: transparent; border: none; color: var(--ide-dim); cursor: pointer;
  padding: 4px 6px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 24px; box-sizing: border-box; overflow: hidden;
}
.theme-toggle svg, .mobile-menu-btn svg { fill: currentColor; }
.theme-toggle:hover, .mobile-menu-btn:hover { background: rgba(255,255,255,0.1); color: var(--ide-highlight); }
.theme-text {
  display: none;
}
.mobile-menu-btn { display: none; }

/* ============ BODY ============ */
.ide-body {
  flex: 1; display: flex; overflow: hidden;
}

/* ACTIVITY BAR */
.ide-activity-bar {
  width: 48px; background: var(--ide-panel); border-right: 1px solid var(--ide-border);
  display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 16px;
  flex-shrink: 0;
}
.activity-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  color: var(--ide-dim); cursor: pointer; border-left: 2px solid transparent; transition: 0.2s;
  text-decoration: none;
}
.activity-icon:hover { color: var(--ide-highlight); }
.activity-icon.active { color: var(--ide-highlight); border-left-color: var(--ide-active-border); }
.activity-icon svg { width: 24px; height: 24px; }

/* SIDEBAR (EXPLORER) */
.ide-sidebar {
  width: 300px; background: var(--ide-surface); border-right: 1px solid var(--ide-border);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow: hidden;
}
.ide-layout.sidebar-collapsed .ide-sidebar { display: none; }
.explorer-title {
  padding: 10px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--ide-dim); text-transform: uppercase;
}
.sidebar-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.sidebar-scrollable {
  flex: 1; overflow-y: auto; padding: 0;
  min-height: 0; display: block;
}

/* SEARCH & FILTERS */
.sidebar-search { padding: 8px 16px; }
.search-input {
  width: 100%; padding: 6px 8px; background: var(--ide-bg); border: 1px solid var(--ide-border);
  color: var(--ide-text); font-family: var(--font-code); font-size: 12px; border-radius: 2px;
}
.search-input:focus { outline: none; border-color: var(--ide-active-border); }

.filters { padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  padding: 4px 8px; background: transparent; border: 1px solid var(--ide-border);
  color: var(--ide-dim); font-size: 10px; cursor: pointer; border-radius: 2px;
  font-family: var(--font-code);
  /* WCAG 2.2 AA 2.5.8 — vùng bấm tối thiểu 24x24 CSS px. Đo ở 375px trước khi
     thêm dòng này: 23px, thiếu đúng 1px. */
  min-height: 24px;
}
.filter-btn:hover { background: rgba(255,255,255,0.05); color: var(--ide-text); }
.filter-btn.active { background: var(--ide-active); border-color: var(--ide-active-border); color: var(--ide-highlight); }

/* FILE LIST (PATTERNS) */
.pattern-list { display: flex; flex-direction: column; padding-bottom: 16px; }
.pattern-item {
  display: flex; align-items: center; gap: 8px; padding: 4px 16px;
  font-size: 13px; color: var(--ide-text); cursor: pointer; -webkit-user-select: none; user-select: none;
  text-decoration: none; border: 1px solid transparent; border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.pattern-item:hover { background: var(--ide-panel); }
.pattern-item.active { background: var(--ide-active); color: var(--ide-highlight); border-left-color: var(--ide-active-border); }
.tree-line { color: var(--ide-dim); font-family: var(--font-code); white-space: pre; font-size: 13px; -webkit-user-select: none; user-select: none; }
.file-icon { color: var(--ide-keyword); font-size: 14px; display: flex; width: 16px; justify-content: center; }
.pattern-item.active .file-icon { color: var(--ide-highlight); }
.pattern-item-info { flex: 1; min-width: 0; }
.file-name {
  word-break: break-word; line-height: 1.4;
}

/* MAIN EDITOR */
.ide-editor {
  flex: 1; display: flex; flex-direction: column; background: var(--ide-bg); min-width: 0;
}
.editor-tabs {
  display: flex; background: var(--ide-surface); height: 35px; border-bottom: 1px solid var(--ide-border);
  overflow-x: auto;
}
.editor-tab {
  padding: 0 16px; display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--ide-dim); border-right: 1px solid var(--ide-border); border-top: 2px solid transparent;
  cursor: pointer; -webkit-user-select: none; user-select: none; min-width: max-content; background: var(--ide-panel);
  transition: background 0.2s ease, color 0.2s ease;
}
.editor-tab.active { background: var(--ide-bg); color: var(--ide-highlight); border-top-color: var(--ide-active-border); }
.tab-close {
  font-size: 14px; margin-left: 4px; opacity: 0; transition: 0.2s;
  /* Đo được 8x22px — hụt cả hai chiều. */
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; min-height: 24px;
}
.editor-tab:hover .tab-close { opacity: 1; }

.editor-content {
  flex: 1; position: relative; display: flex;
  /* min-height:0 lets this flex item shrink instead of expanding with its
     content (e.g. a tall PNG) and pushing the tab row out of the viewport. */
  min-height: 0; min-width: 0; overflow: hidden;
}
iframe#viewer { width: 100%; height: 100%; border: none; background: transparent; position: relative; z-index: 2; }
iframe#viewer-secondary { width: 100%; height: 100%; border: none; background: transparent; position: relative; z-index: 2; }

/* PREVIEW CANVAS (HTML iframe + PNG image) */
.preview-canvas { min-height: 0; min-width: 0; overflow: hidden; }
.preview-frame {
  display: flex; align-items: center; justify-content: center;
  overflow: auto; height: 100%;
}
/* Fit large PNGs to the viewport instead of overflowing the layout. */
.preview-frame img {
  display: block; margin: auto;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}

/* WELCOME SCREEN */

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ide-dim);
  text-align: center;
  -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle at center, rgba(95, 209, 176, 0.03) 0%, transparent 60%);
}

.welcome-screen h1 { font-size: 32px; font-weight: 400; margin-bottom: 16px; color: var(--ide-highlight); }
.welcome-screen p { color: var(--ide-dim); font-size: 14px; margin-bottom: 8px; }
.welcome-screen .shortcut { color: var(--ide-keyword); }

/* STATUS BAR */
.ide-statusbar {
  height: 26px; background: var(--ide-statusbar-bg); color: var(--ide-statusbar-fg); display: flex; align-items: center;
  justify-content: space-between; padding: 0 12px; font-size: 12px; font-weight: 500; flex-shrink: 0;
  border-top: 1px solid var(--ide-border);
}
.status-left, .status-right { display: flex; align-items: center; gap: 16px; }
.status-item { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.status-item:hover { background: rgba(255,255,255,0.15); border-radius: 2px; box-shadow: 0 0 0 4px rgba(255,255,255,0.15); }

/* SCROLLBARS */
.ide-layout ::-webkit-scrollbar { width: 12px; height: 12px; }
.ide-layout ::-webkit-scrollbar-track { background: var(--ide-bg); }
.ide-layout ::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.4); border: 3px solid var(--ide-bg); border-radius: 6px; }
.ide-layout ::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.7); }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
  .status-left, .status-right {
    gap: 8px;
  }
  
  .ide-activity-bar {
    display: flex;
    flex-direction: column;
    width: 48px;
    height: 100%;
    z-index: 60;
  }
  .ide-sidebar {
    width: calc(100vw - 48px);
    position: absolute;
    left: 48px;
    z-index: 50;
    top: 35px;
    bottom: 26px;
    transform: translateX(-110%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .ide-sidebar.open {
    transform: translateX(0);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
  }
  .mobile-menu-btn {
    display: flex;
  }
}

.mobile-backdrop {
  display: none;
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-backdrop.open {
  display: block;
  opacity: 1;
}

/* ============ BREADCRUMB PATH DROPDOWN ============ */
.title-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ide-dim);
  white-space: nowrap;
}
.path-dropdown-container {
  position: relative;
  display: inline-block;
  min-width: 0;
}
.path-dropdown-trigger {
  color: var(--ide-highlight);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  min-height: 24px;   /* 2.5.8 — đo được 23px */
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.path-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ide-active-border);
}
.light .path-dropdown-trigger:hover {
  background: rgba(0, 0, 0, 0.05);
}
.chevron-icon {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  vertical-align: middle;
}
.path-dropdown-container.open .chevron-icon {
  transform: rotate(180deg);
}
.path-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ide-surface);
  border: 1px solid var(--ide-border);
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  z-index: 1000;
  min-width: 130px;
  padding: 4px 0;
}
.path-dropdown-container.open .path-dropdown-menu {
  display: block;
}
.path-dropdown-item {
  padding: 6px 16px;
  color: var(--ide-dim);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  font-family: var(--font-code);
}
.path-dropdown-item:hover {
  background: var(--ide-panel);
  color: var(--ide-highlight);
}
.path-dropdown-item.active {
  background: var(--ide-active);
  color: var(--ide-highlight);
  font-weight: 600;
}


/* OVERRIDES FOR DIAGRAM LIBRARY */
.chapter-group { margin-bottom: 0; }
.chapter-header {
  padding: 4px 16px; font-size: 13px; font-weight: 600; color: var(--ide-text);
  background: transparent; cursor: pointer; display: flex; align-items: center; gap: 8px;
  -webkit-user-select: none; user-select: none; border: 1px solid transparent; border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.chapter-header:hover { background: var(--ide-panel); }
.chapter-header::before { content: '>'; font-size: 11px; font-weight: 900; transition: 0.2s; color: var(--ide-dim); }
.chapter-header.active::before { transform: rotate(90deg); color: var(--ide-highlight); }

.diagram-list { display: none; }
.chapter-header.active + .diagram-list { display: block; }
.diagram-item {
  padding: 4px 16px 4px 30px; font-size: 13px; color: var(--ide-text); cursor: pointer;
  display: flex; align-items: center; gap: 8px; -webkit-user-select: none; user-select: none;
  text-decoration: none; border: 1px solid transparent; border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.diagram-item:hover { background: var(--ide-panel); }
.diagram-item.active { background: var(--ide-active); color: var(--ide-highlight); border-left-color: var(--ide-active-border); }

/* PREVIEW TABS (HTML | PNG) */
.preview-tabs {
  display: inline-flex;
  background: var(--ide-panel);
  border: 1px solid var(--ide-border);
  border-radius: 4px;
  overflow: hidden;
}
.preview-tab {
  background: transparent;
  border: none;
  color: var(--ide-dim);
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.preview-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ide-text);
}
.preview-tab.active {
  background: var(--ide-active);
  color: var(--ide-highlight);
}
.preview-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--ide-dim); font-size: 14px; gap: 12px; font-family: var(--font-code);
}
.preview-empty-icon {
  width: 48px; height: 48px; border: 2px solid var(--ide-border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--ide-close);
}

/* ============================================
   Custom IDE Icon Colors
   ============================================ */
.ide-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
  flex-shrink: 0;
}

.file-icon svg.ide-icon-folder {
  color: var(--ide-folder); /* VS Code folder yellow */
}
.file-icon svg.ide-icon-doc {
  color: var(--ide-dim); /* VS Code markdown/documentation grey */
}
.file-icon svg.ide-icon-code {
  color: var(--ide-keyword); /* VS Code code file blue */
}
.file-icon svg.ide-icon-diagram {
  color: var(--ide-schema); /* VS Code schema/diagram teal/green */
}
.file-icon svg.ide-icon-config {
  color: var(--ide-config); /* VS Code config file orange */
}

/* Ensure active items override SVG colors to match high contrast active state */
.pattern-item.active .file-icon svg,
.diagram-item.active .file-icon svg {
  color: var(--ide-highlight) !important;
}

/* ============================================
   Reading Progress Bar
   ============================================ */
.reading-progress-container {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.reading-progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: repeating-linear-gradient(
    90deg,
    var(--ide-active-border) 0,
    var(--ide-active-border) 12px,
    transparent 12px,
    transparent 16px
  );
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.4);
  position: relative;
}
.reading-progress-bar::after {
  content: '';
  position: absolute;
  top: -1px;
  right: 0;
  width: 12px;
  height: 5px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 
    0 0 10px #fff,
    0 0 20px var(--ide-active-border),
    0 0 30px var(--ide-active-border);
}



@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ide-editor iframe.fade-in {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.pattern-item {
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.editor-tab:active, .pattern-item:active, .path-dropdown-item:active {
  transform: scale(0.98);
  transition: transform 0.1s;
}

/* Noise overlay */
/* Removed GPU tax overlay */

/* ============================================
   Floating Feedback Widget
   ============================================ */
.floating-feedback-container { position: fixed; bottom: 40px; right: 24px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.floating-feedback-btn { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; background: var(--ide-active-border); color: var(--ide-bg); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s, box-shadow 0.2s; }
.floating-feedback-btn:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); filter: brightness(1.1); }
.floating-feedback-btn:active { transform: scale(0.95); }
.feedback-popover { pointer-events: auto; position: absolute; bottom: 56px; right: 0; width: 280px; background: var(--ide-surface); border: 1px solid var(--ide-border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(10px) scale(0.98); transform-origin: bottom right; visibility: hidden; transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s; overflow: hidden; font-family: var(--font-sans); }
.floating-feedback-container.open .feedback-popover { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
.feedback-popover-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--ide-panel); border-bottom: 1px solid var(--ide-border); font-size: 13px; font-weight: 600; color: var(--ide-text); }
.feedback-popover-close { background: transparent; border: none; color: var(--ide-dim); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 4px; }
.feedback-popover-close:hover { color: var(--ide-close); background: rgba(255, 95, 86, 0.1); }
.feedback-popover-body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.feedback-popover-body p { margin: 0; font-size: 12px; color: var(--ide-dim); line-height: 1.5; }
.feedback-action-btn { background: var(--ide-active-border); color: var(--ide-bg); border: none; padding: 8px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: filter 0.2s; font-family: var(--font-sans); }
.feedback-action-btn:hover { filter: brightness(1.1); }
@media (max-width: 768px) { .floating-feedback-container { bottom: 34px; right: 16px; } }
