/* ============================================
   RoccoFlow App — Scoped Styles
   All selectors scoped under .roccoflow-root
   Class prefix: rf-
   ============================================ */

/* Root Container */
.roccoflow-root {
  display: grid;
  grid-template-rows: 48px 1fr;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #e0e0e0;
  overflow: hidden;
  background: #1e1e1e;
}

/* ── Top Bar ── */
.roccoflow-root .rf-top-bar {
  height: 48px;
  background: #292929;
  border-bottom: 1px solid #363636;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
}

.roccoflow-root .rf-top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
}

.roccoflow-root .rf-logo-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  padding: 6px 8px;
  border-radius: 4px;
}

.roccoflow-root .rf-logo-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.roccoflow-root .rf-logo-text {
  font-weight: 500;
}

.roccoflow-root .rf-top-tabs {
  display: flex;
  gap: 4px;
}

.roccoflow-root .rf-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #808080;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-weight: 500;
  position: relative;
  text-decoration: none;
}

.roccoflow-root .rf-tab-btn:hover {
  color: #e0e0e0;
  background: #2d2d2d;
}

.roccoflow-root .rf-tab-btn.active {
  color: #fff;
  background: #3d3d3d;
}

.roccoflow-root .rf-tab-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.roccoflow-root .rf-top-bar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.roccoflow-root .rf-top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.roccoflow-root .rf-btn-secondary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid #363636;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  background: transparent;
  color: #e0e0e0;
  position: relative;
}

.roccoflow-root .rf-btn-secondary:hover {
  background: #363636;
  border-color: #404040;
}

.roccoflow-root .rf-share-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f1f1f;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  z-index: 20;
}

.roccoflow-root .rf-share-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #1f1f1f;
}

.roccoflow-root .rf-btn-secondary.copied .rf-share-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ── Main Layout ── */
.roccoflow-root .rf-main {
  display: grid;
  grid-template-columns: 40px 1fr 280px;
  overflow: hidden;
}

.roccoflow-root.rf-compact .rf-main {
  grid-template-columns: 40px 1fr;
}

.roccoflow-root.rf-compact .rf-right-sidebar {
  display: none;
}

/* ── Left Sidebar ── */
.roccoflow-root .rf-left-sidebar {
  background: #1f1f1f;
  border-right: 1px solid #363636;
  display: flex;
}

.roccoflow-root .rf-sidebar-icons {
  width: 40px;
  min-width: 40px;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  gap: 2px;
  background: #252525;
  justify-content: space-between;
}

.roccoflow-root .rf-icon-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.roccoflow-root .rf-icon-group-bottom {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: auto;
}

.roccoflow-root .rf-icon-btn {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  background: transparent;
  border: none;
  color: #808080;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.roccoflow-root .rf-icon-btn:hover {
  background: #3d3d3d;
  color: #e0e0e0;
}

.roccoflow-root .rf-icon-btn svg {
  width: 16px;
  height: 16px;
}

.roccoflow-root .rf-separator {
  height: 1px;
  background: #363636;
  margin: 6px 8px;
}

/* ── Canvas Area ── */
.roccoflow-root .rf-canvas-area {
  background: #2b2b2b;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.roccoflow-root .rf-canvas-toolbar {
  height: 32px;
  min-height: 32px;
  background: #2b2b2b;
  border-bottom: 1px solid #3d3d3d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.roccoflow-root .rf-canvas-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roccoflow-root .rf-canvas-toolbar-center {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.roccoflow-root .rf-canvas-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roccoflow-root .rf-toolbar-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #a0a0a0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.roccoflow-root .rf-toolbar-btn:hover {
  background: #363636;
  color: #fff;
}

.roccoflow-root .rf-toolbar-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.roccoflow-root .rf-toolbar-btn svg {
  width: 14px;
  height: 14px;
}

.roccoflow-root .rf-separator-vertical {
  width: 1px;
  height: 16px;
  background: #363636;
}

.roccoflow-root .rf-viewport-width-btn {
  background: transparent;
  border: none;
  color: #a0a0a0;
  font-size: 11px;
  cursor: default;
  padding: 4px 6px;
}

.roccoflow-root .rf-breakpoint-selector {
  display: flex;
  gap: 2px;
}

.roccoflow-root .rf-breakpoint-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #808080;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.roccoflow-root .rf-breakpoint-btn:hover {
  background: #363636;
  color: #e0e0e0;
}

.roccoflow-root .rf-breakpoint-btn.active {
  color: #fff;
  background: #3d3d3d;
}

.roccoflow-root .rf-breakpoint-btn svg {
  width: 16px;
  height: 16px;
}

/* Canvas wrapper & iframe */
.roccoflow-root .rf-canvas-wrapper {
  flex: 1;
  width: 100%;
  max-width: 100%;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #2b2b2b;
  overflow: hidden;
  padding: 0;
}

.roccoflow-root .rf-iframe {
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  position: relative;
  z-index: 1;
  transition: width 0.3s ease; /* width intentional: breakpoint switcher needs actual layout reflow */
}

/* ── Overlay Boxes (hover/select) ── */
.roccoflow-root .rf-element-hover-box {
  position: absolute;
  border: 2px solid #0088ff;
  pointer-events: none;
  z-index: 5;
  border-radius: 2px;
}

.roccoflow-root .rf-element-select-box {
  position: absolute;
  border: 2px solid #0066ff;
  pointer-events: none;
  z-index: 6;
  border-radius: 2px;
}

.roccoflow-root .rf-element-hover-label {
  position: absolute;
  background: #0066ff;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  z-index: 7;
  pointer-events: none;
  white-space: nowrap;
}

/* Breadcrumb trail */
.roccoflow-root .rf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
}

.roccoflow-root .rf-breadcrumb-item {
  background: transparent;
  border: none;
  color: #808080;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roccoflow-root .rf-breadcrumb-item:hover {
  color: #e0e0e0;
  background: #363636;
}

.roccoflow-root .rf-breadcrumb-item.active {
  color: #fff;
}

.roccoflow-root .rf-breadcrumb-chevron {
  color: #666;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.roccoflow-root .rf-breadcrumb-ellipsis {
  color: #666;
  font-size: 12px;
  padding: 2px 4px;
}

.roccoflow-root .rf-no-selection-text {
  color: #666;
  font-size: 12px;
}

/* ── Right Sidebar ── */
.roccoflow-root .rf-right-sidebar {
  background: #252525;
  border-left: 1px solid #363636;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.roccoflow-root .rf-inspector-header {
  padding: 12px 16px;
  border-bottom: none;
}

.roccoflow-root .rf-inspector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.roccoflow-root .rf-element-type-icon {
  width: 16px;
  height: 16px;
  color: #a0a0a0;
}

.roccoflow-root .rf-element-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.roccoflow-root .rf-selected-status {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roccoflow-root .rf-checkbox-icon {
  width: 16px;
  height: 16px;
  color: #a0a0a0;
  flex-shrink: 0;
}

.roccoflow-root .rf-status-label {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.roccoflow-root .rf-inspector-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid #363636;
  border-bottom: 1px solid #363636;
  margin: 0 -16px;
  padding: 0 16px;
}

.roccoflow-root .rf-inspector-tab {
  background: transparent;
  border: none;
  color: #808080;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  margin-bottom: -1px;
  font-weight: 400;
}

.roccoflow-root .rf-inspector-tab:hover {
  color: #e0e0e0;
}

.roccoflow-root .rf-inspector-tab.active {
  color: #fff;
  border-bottom-color: #146ef5;
  font-weight: 500;
}

.roccoflow-root .rf-inspector-content {
  padding: 0 16px 32px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Empty state */
.roccoflow-root .rf-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  margin-top: 24px;
}

.roccoflow-root .rf-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.3;
  color: #666;
}

.roccoflow-root .rf-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: #a0a0a0;
  margin-bottom: 8px;
}

.roccoflow-root .rf-empty-subtitle {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ── Typography Panel ── */
.roccoflow-root .rf-typography-panel {
  padding-top: 8px;
}

.roccoflow-root .rf-typo-section {
  margin-bottom: 8px;
}

.roccoflow-root .rf-typo-section.collapsed .rf-typo-section-content {
  display: none;
}

.roccoflow-root .rf-typo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
}

.roccoflow-root .rf-typo-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.roccoflow-root .rf-typo-section-header .rf-chevron-icon {
  width: 12px;
  height: 12px;
  color: #a0a0a0;
  transition: transform 0.2s ease;
}

.roccoflow-root .rf-typo-section.collapsed .rf-chevron-icon {
  transform: rotate(-90deg);
}

.roccoflow-root .rf-typo-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.roccoflow-root .rf-typo-label {
  font-size: 11px;
  color: #a0a0a0;
  min-width: 48px;
  flex-shrink: 0;
  cursor: pointer;
}

.roccoflow-root .rf-typo-label.changed {
  color: #0066ff;
}

.roccoflow-root .rf-typo-input-wrapper {
  flex: 1;
}

.roccoflow-root .rf-typo-select {
  width: 100%;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.roccoflow-root .rf-typo-select:focus {
  border-color: #0066ff;
}

.roccoflow-root .rf-typo-size-input {
  width: 100%;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  outline: none;
}

.roccoflow-root .rf-typo-size-input:focus {
  border-color: #0066ff;
}

.roccoflow-root .rf-typo-size-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px 1fr;
  gap: 8px;
  align-items: center;
}

.roccoflow-root .rf-typo-color-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.roccoflow-root .rf-typo-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #404040;
  cursor: pointer;
  flex-shrink: 0;
}

.roccoflow-root .rf-typo-color-input {
  flex: 1;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.roccoflow-root .rf-typo-color-input:focus {
  border-color: #0066ff;
}

.roccoflow-root .rf-typo-color-picker {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.roccoflow-root .rf-typo-button-group {
  display: flex;
  gap: 2px;
  flex: 1;
}

.roccoflow-root .rf-typo-btn {
  width: 32px;
  height: 28px;
  background: #363636;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #a0a0a0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.roccoflow-root .rf-typo-btn:hover {
  background: #404040;
  color: #fff;
}

.roccoflow-root .rf-typo-btn.active {
  background: #2b2b2b;
  border-color: #0066ff;
  color: #fff;
}

.roccoflow-root .rf-typo-btn svg {
  width: 14px;
  height: 14px;
}

/* Layout panel controls */
.roccoflow-root .rf-layout-btn-group {
  display: flex;
  gap: 2px;
  flex: 1;
}

.roccoflow-root .rf-layout-btn {
  padding: 4px 8px;
  background: #363636;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #a0a0a0;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roccoflow-root .rf-layout-btn:hover {
  background: #404040;
  color: #fff;
}

.roccoflow-root .rf-layout-btn.active {
  background: #2b2b2b;
  border-color: #0066ff;
  color: #fff;
}

.roccoflow-root .rf-layout-btn svg {
  width: 14px;
  height: 14px;
}

.roccoflow-root .rf-flex-only-row {
  display: none;
}

.roccoflow-root .rf-flex-only-row.visible {
  display: flex;
}

.roccoflow-root .rf-align-controls {
  display: flex;
  gap: 8px;
  flex: 1;
}

.roccoflow-root .rf-align-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.roccoflow-root .rf-align-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #404040;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roccoflow-root .rf-align-dot:hover {
  background: #666;
}

.roccoflow-root .rf-align-dot.active {
  background: #0066ff;
}

.roccoflow-root .rf-align-dropdowns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.roccoflow-root .rf-align-dropdown-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.roccoflow-root .rf-align-axis {
  font-size: 11px;
  color: #808080;
  width: 12px;
}

.roccoflow-root .rf-layout-select {
  flex: 1;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  outline: none;
}

.roccoflow-root .rf-gap-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.roccoflow-root .rf-gap-slider {
  flex: 1;
  accent-color: #0066ff;
}

.roccoflow-root .rf-typo-num-input {
  width: 40px;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  text-align: center;
  outline: none;
}

.roccoflow-root .rf-typo-num-input:focus {
  border-color: #0066ff;
}

/* ── Themer Panel ── */
.roccoflow-root .rf-themer-panel {
  padding-top: 8px;
}

.roccoflow-root .rf-themer-section {
  margin-bottom: 8px;
}

.roccoflow-root .rf-themer-section.collapsed .rf-themer-section-content {
  display: none;
}

.roccoflow-root .rf-themer-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
}

.roccoflow-root .rf-themer-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.roccoflow-root .rf-themer-section-header .rf-chevron-icon {
  width: 12px;
  height: 12px;
  color: #a0a0a0;
  transition: transform 0.2s ease;
}

.roccoflow-root .rf-themer-section.collapsed .rf-chevron-icon {
  transform: rotate(-90deg);
}

.roccoflow-root .rf-themer-variable-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.roccoflow-root .rf-themer-variable-label {
  font-size: 11px;
  color: #a0a0a0;
  min-width: 60px;
  max-width: 80px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roccoflow-root .rf-themer-variable-input-wrapper {
  flex: 1;
}

.roccoflow-root .rf-themer-variable-input {
  width: 100%;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}

.roccoflow-root .rf-themer-variable-input:focus {
  border-color: #0066ff;
}

.roccoflow-root .rf-themer-font-select {
  width: 100%;
  background: #363636;
  border: 1px solid #404040;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}

.roccoflow-root .rf-themer-empty {
  color: #666;
  font-size: 12px;
  padding: 8px 0;
}

/* ── Features Panel (RoccoBomb) ── */
.roccoflow-root .rf-features-panel {
  padding-top: 8px;
}

.roccoflow-root .rf-features-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
}

.roccoflow-root .rf-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  cursor: grab;
  transition: background 0.15s ease;
  margin-bottom: 4px;
}

.roccoflow-root .rf-feature-item:hover {
  background: #363636;
}

.roccoflow-root .rf-feature-item.dragging {
  opacity: 0.4;
}

.roccoflow-root .rf-feature-icon-wrapper {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.roccoflow-root .rf-feature-icon-wrapper img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.roccoflow-root .rf-feature-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.roccoflow-root .rf-feature-description {
  font-size: 11px;
  color: #808080;
  line-height: 1.4;
}

/* Floating bomb during drag */
.roccoflow-root .rf-floating-bomb {
  position: fixed;
  z-index: var(--z-preloader);
  pointer-events: none;
  display: none;
}

.roccoflow-root .rf-floating-bomb img {
  width: 48px;
  height: 48px;
}

/* Floating balloon during drag */
.roccoflow-root .rf-floating-balloon {
  position: fixed;
  z-index: var(--z-preloader);
  pointer-events: none;
  display: none;
  will-change: transform;
}

.roccoflow-root .rf-floating-balloon-emoji {
  font-size: 48px;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Pixelation overlay */
.roccoflow-root .rf-pixelation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  pointer-events: none;
  display: none;
}

/* ── Wonderwall Tooltip ── */
.rf-wonderwall-tooltip {
  position: fixed;
  z-index: var(--z-preloader);
  background: #2b2b2b;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  white-space: normal;
  max-width: 300px;
  line-height: 1.4;
  pointer-events: none;
  border: 1px solid #404040;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-50%) scale(0.8) rotate(-2deg);
  transition: opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              font-size 0.2s ease;
}

.rf-wonderwall-tooltip.show {
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0deg);
}

@keyframes rfTooltipBounce {
  0% { transform: translateY(-50%) scale(0.8) rotate(-2deg); }
  50% { transform: translateY(-50%) scale(1.1) rotate(1deg); }
  100% { transform: translateY(-50%) scale(1) rotate(0deg); }
}

.rf-wonderwall-tooltip.bounce {
  animation: rfTooltipBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Undo/Redo Badge ── */
.roccoflow-root .rf-undo-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #0066ff;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

.roccoflow-root .rf-toolbar-btn {
  position: relative;
}

/* ── Shortcuts Help Overlay ── */
.roccoflow-root .rf-shortcuts-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.roccoflow-root .rf-shortcuts-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.roccoflow-root .rf-shortcuts-panel {
  background: #2b2b2b;
  border: 1px solid #404040;
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.roccoflow-root .rf-shortcuts-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roccoflow-root .rf-shortcuts-close {
  background: none;
  border: none;
  color: #808080;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roccoflow-root .rf-shortcuts-close:hover {
  background: #363636;
  color: #fff;
}

.roccoflow-root .rf-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
}

.roccoflow-root .rf-shortcuts-table tr {
  border-bottom: 1px solid #363636;
}

.roccoflow-root .rf-shortcuts-table tr:last-child {
  border-bottom: none;
}

.roccoflow-root .rf-shortcuts-table td {
  padding: 8px 0;
  font-size: 13px;
}

.roccoflow-root .rf-shortcuts-table td:first-child {
  color: #a0a0a0;
  width: 50%;
}

.roccoflow-root .rf-shortcuts-table td:last-child {
  color: #e0e0e0;
}

.roccoflow-root .rf-shortcuts-key {
  display: inline-block;
  background: #1e1e1e;
  border: 1px solid #404040;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: -apple-system, monospace;
  color: #e0e0e0;
  margin-right: 2px;
}

/* ── Navigator Panel ── */
.roccoflow-root .rf-nav-panel {
  width: 0;
  overflow: hidden;
  background: #1f1f1f;
  border-right: 1px solid #363636;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  opacity: 0;
}

.roccoflow-root .rf-nav-panel.visible {
  width: 240px;
  opacity: 1;
}

.roccoflow-root .rf-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #363636;
  min-height: 36px;
}

.roccoflow-root .rf-nav-title {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.roccoflow-root .rf-nav-close-btn {
  background: none;
  border: none;
  color: #808080;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roccoflow-root .rf-nav-close-btn:hover {
  background: #363636;
  color: #e0e0e0;
}

.roccoflow-root .rf-nav-search-wrapper {
  padding: 8px;
  border-bottom: 1px solid #363636;
}

.roccoflow-root .rf-nav-search {
  width: 100%;
  background: #2b2b2b;
  border: 1px solid #363636;
  color: #e0e0e0;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.roccoflow-root .rf-nav-search:focus {
  border-color: #0066ff;
}

.roccoflow-root .rf-nav-search::placeholder {
  color: #666;
}

.roccoflow-root .rf-nav-tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
}

/* Tree Nodes */
.roccoflow-root .rf-nav-node {
  user-select: none;
}

.roccoflow-root .rf-nav-node-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.1s ease;
  white-space: nowrap;
  min-height: 24px;
}

.roccoflow-root .rf-nav-node-row:hover {
  background: #2b2b2b;
}

.roccoflow-root .rf-nav-node-row.selected {
  background: #0066ff22;
}

.roccoflow-root .rf-nav-node-row.selected .rf-nav-tag-name,
.roccoflow-root .rf-nav-node-row.selected .rf-nav-class-name {
  color: #4d9fff;
}

.roccoflow-root .rf-nav-expand-btn {
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.roccoflow-root .rf-nav-expand-btn.expanded {
  transform: rotate(90deg);
}

.roccoflow-root .rf-nav-expand-btn.leaf {
  visibility: hidden;
}

.roccoflow-root .rf-nav-tag-icon {
  width: 14px;
  height: 14px;
  color: #808080;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roccoflow-root .rf-nav-tag-icon svg {
  width: 12px;
  height: 12px;
}

.roccoflow-root .rf-nav-tag-name {
  font-size: 12px;
  color: #a0a0a0;
  margin-left: 4px;
}

.roccoflow-root .rf-nav-class-name {
  font-size: 11px;
  color: #666;
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roccoflow-root .rf-nav-children {
  padding-left: 12px;
}

.roccoflow-root .rf-nav-node.hidden {
  display: none;
}

/* Nav-open grid layout adjustment */
.roccoflow-root.rf-nav-open .rf-main {
  grid-template-columns: 40px auto 1fr 280px;
}

.roccoflow-root.rf-nav-open.rf-compact .rf-main {
  grid-template-columns: 40px auto 1fr;
}

/* Navigator icon active state */
.roccoflow-root.rf-nav-open .rf-icon-btn[title="Navigator (Z)"] {
  background: #3d3d3d;
  color: #fff;
}

/* ── Scrollbar ── */
.roccoflow-root ::-webkit-scrollbar {
  width: 6px;
}

.roccoflow-root ::-webkit-scrollbar-track {
  background: transparent;
}

.roccoflow-root ::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 3px;
}

.roccoflow-root ::-webkit-scrollbar-thumb:hover {
  background: #555;
}
