

/* ===== co-located from css/styles.css (core: rail-flyout) ===== */
/* ─── 6. FLYOUT PANEL ─────────────────────────────────────────── */

.flyout-panel {
  width: 0;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.flyout-panel.open {
  width: 336px; /* ~20% wider for better fit (AI, tools, etc.) */
}

.flyout-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flyout-header .flyout-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.12s;
}

.flyout-header .flyout-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.flyout-header-action-btn {
  margin-left: auto;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.flyout-header-action-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--surface3);
}

.flyout-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.flyout-body::-webkit-scrollbar {
  width: 3px;
}

.flyout-body::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px;
}

.flyout-section {
  display: none;
}

.flyout-section.active {
  display: block;
}

.flyout-section[data-section="ai"] {
  margin: -12px;
  height: calc(100vh - var(--bar) - 64px);
}

/* Text panel styles moved to modules/left-panel/text/ — text.css (.txp-*) +
   per-sub-module CSS: pairings/.fp- effects/.fx- dynamic/.dyn- (Faz 2). */

/* ─── Flyout Icon Tabs & Grid ──────────────────────────────── */
.flyout-icon-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.flyout-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-right: 2px;
}

.flyout-icon-cell {
  min-height: 104px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.flyout-icon-cell-media {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex: 0 0 auto;
}

.flyout-icon-cell-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 24px;
  max-width: 100%;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: var(--text-dim);
  word-break: break-word;
}

.flyout-panel .flyout-icon-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.flyout-panel .flyout-icon-cell {
  aspect-ratio: auto;
  min-height: 88px;
  padding: 8px 6px;
  gap: 6px;
  border-radius: var(--r-md);
  font-size: 16px;
}

.flyout-panel .flyout-icon-cell:hover {
  transform: translateY(-1px);
}

.flyout-panel .flyout-icon-cell-media {
  width: 24px;
  height: 24px;
}

.flyout-panel .flyout-icon-cell-label {
  min-height: 22px;
  font-size: 9px;
  line-height: 1.18;
}

body.wb-zen .flyout-panel {
  width: 0 !important;
  opacity: 0;
  pointer-events: none;
}
