/* ══════════════════════════════════════
   Right Panel (Properties + Layers)
   ══════════════════════════════════════ */

#panel-right {
  width: var(--panel-width);
  max-width: var(--panel-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.panel-header {
  border-bottom: 1px solid var(--border-subtle);
}

.panel-tabs {
  display: flex;
}

.panel-tab {
  flex: 1;
  padding: 10px 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.panel-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.panel-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.panel-content {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-lg);
}

/* ── Property Group ── */
.property-group {
  margin-bottom: var(--space-xl);
}

.property-group-title {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.property-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding: 3px 0;
}

.property-row label {
  width: 70px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.property-row input[type="number"] {
  flex: 1;
}

.kf-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 2px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  cursor: pointer;
}

.kf-btn:hover {
  color: var(--keyframe-color);
  background: rgba(245, 166, 35, 0.15);
  transform: scale(1.2);
}

.kf-btn.has-keyframe {
  color: var(--keyframe-color);
  text-shadow: 0 0 6px var(--keyframe-color);
}

/* ── Action Button ── */
.action-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--accent-primary-glow);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.action-btn:hover {
  background: var(--accent-primary);
  color: white;
}

/* ── Layers Panel ── */
.layers-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.layers-empty p:first-child {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.layers-hint {
  font-size: var(--fs-xs);
}

#layers-list {
  list-style: none;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.layer-item:hover {
  background: var(--bg-hover);
}

.layer-item.selected {
  background: var(--accent-primary-glow);
  border: 1px solid var(--accent-primary);
}

.layer-visibility {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.layer-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-secondary);
}

.layer-name {
  flex: 1;
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
